-
Notifications
You must be signed in to change notification settings - Fork 25k
Description
Hello, recently I was just trying to setup a Blazor project with Azure AD.
Indeed, I want to have few clarifications - im not sure if
(1)
In the doc it mentions: "when publisher domain of the directory is untruysed...",
then app url should be written as
"https:////<default_scope>"
But, when I setup using the https scheme it does not work but when I switch back to api:// scheme, this works magically. (In azure portal, I can see failure login saying "The resource principal named {name} was not found in the tenant named {tenant}.")
I believe I'm on the "untrusted" publisher domain, because I see my publisher domain as .onmicrosoft.com with a message saying "The application’s consent screen will show ‘Unverified..."
(2)
For scope, the doc mentioned adding a default "API.Access"
In Blazor server, it seems it also require another scope, named as access_as_user.
So I either need to add an extra scope or user "access_as_user" as the default scope.
For above two items, I want to know if there is actually a discrepancy between the correct-setup and the doc. Or it was something I am doing wrong? Honestly, strictly following the doc doesn't seem to allow me to setup a working project with Azure AD.
In terms of feedback,
For the appsetting section for Server API , one part mentioning : "To configure the server API app for a matching audience, set the Audience in the Server API app settings file...,
which then includes "Audience", "Authority", "ValidateAuthority"
However, Im not sure if this is actually needed for SERVER?
The template generated from Visual Studio and dotnet cli does not contains this section also. And when I setup the app without these 3 settings, it seems the authentication/authorization still function correctly.
I would feel much better if some explanation can be added here?
I am using NET5, and viewing the doc on web on 5.0 as well.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 3039ff79-ee86-20b1-0082-d3899a84c823
- Version Independent ID: af4a3a75-ae52-5f6d-2120-737bc2fefb07
- Content: Secure an ASP.NET Core Blazor WebAssembly hosted app with Azure Active Directory
- Content Source: aspnetcore/blazor/security/webassembly/hosted-with-azure-active-directory.md
- Product: aspnet-core
- Technology: aspnetcore-blazor
- GitHub Login: @guardrex
- Microsoft Alias: riande
Metadata
Metadata
Assignees
Labels
Type
Projects
Status