Skip to content

Add section on app settings configuration to BWA+Entra article #35377

@guardrex

Description

@guardrex

Description

After dotnet/blazor-samples#533 is worked, place app settings config in a new section of this article.

BlazorWebAppEntra project:

{
  "AzureAd": {
    "CallbackPath": "/signin-oidc",
    "ClientId": "{CLIENT ID}",
    "Domain": "{DIRECTORY NAME}.onmicrosoft.com",
    "Instance": "https://login.microsoftonline.com/",
    "ResponseType": "code",
    "TenantId": "{TENANT ID}"
  },
  "DownstreamApi": {
    "BaseUrl": "{BASE ADDRESS}",
    "Scopes": [ "{APP ID URI}/Weather.Get" ]
  }
}

The MinimalApiJwt project already uses Program file-based configuration. For the article section ...

"Authentication": {
  "Schemes": {
    "Bearer": {
      "Authority": "https://sts.windows.net/{TENANT ID (WEB API)}/",
      "ValidAudiences": [ "{APP ID URI (WEB API)}" ]
    }
  }
},

Remove the following lines from the Program file ...

- jwtOptions.Authority = "{AUTHORITY}";
- jwtOptions.Audience = "{AUDIENCE}";

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/security/blazor-web-app-with-entra?view=aspnetcore-9.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/security/blazor-web-app-with-entra.md

Document ID

58758d13-94c9-e208-e0f6-16676834413c

Platform Id

1c89a093-14c3-881b-7297-49c7c6cb4ea1

Article author

@guardrex

Metadata

  • ID: 58758d13-94c9-e208-e0f6-16676834413c
  • PlatformId: 1c89a093-14c3-881b-7297-49c7c6cb4ea1
  • Service: aspnet-core
  • Sub-service: blazor

Related Issues

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions