Skip to content

[Blazor] Blazor Web App with multiple secure API not working with OIDC #60868

@mihirpatelipsos

Description

@mihirpatelipsos

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I was looking for the solution to work with Blazor Web App with multiple downstream secure APIs which were not part of the BWA project.
I've been following the BWA with OIDC (BFF pattern) article and sample based on following documents:

https://learn.microsoft.com/en-us/aspnet/core/blazor/security/blazor-web-app-with-oidc?view=aspnetcore-9.0&pivots=with-bff-pattern
https://github.com/dotnet/blazor-samples/tree/main/9.0/BlazorWebAppOidcBff

It is working fine when I am connecting to single secure API, but failing with following error when I try to add more than one API scopes:

It seems OIDC was failing with static scope limit exceeded error.

Image

Code:
Image

How can I work with the multiple secure APIs using OIDC or Entra Id based Identity through BWA?

Expected Behavior

Blazor Web App (BWA) should be able to access multiple secure APIs which are outside of Blazor project.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

dotnet 9.0

Anything else?

cc: @guardrex dotnet/AspNetCore.Docs#34927

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions