Closed Henkolicious closed 3 years ago
@Henkolicious I think in the client program.cs, you need to have the scope for your blazorwasm server because that's what your trying to get access to, for example:
options.ProviderOptions.DefaultAccessTokenScopes.Add("api://a4c2469b-cf84-4145-8f5f-cb7bacf814bc/access_as_user");
and remove the other two lines:
options.ProviderOptions.DefaultAccessTokenScopes.Add("profile");
options.ProviderOptions.DefaultAccessTokenScopes.Add("user.read");
@Henkolicious did the above work for you?
@Henkolicious did the above work for you?
@jennyf19 Have not gotten around to it yet, I'll try to test it sometime this week and I'll get back to you. Thanks đź‘Ť
@Henkolicious : we tested Microsoft.Identity.Web with .NET 5 RC2, and RTM. Proposing to close this issue, but feel free to reopen if this does not work for you
Which version of Microsoft Identity Web are you using?
Microsoft.Identity.Web
0.4.0-preview
Microsoft.Identity.Web.UI
0.4.0-preview
Where is the issue?
Repro
CLI
dotnet new wasm --hosted --auth SingleOrg -n demo
SDK
Microsoft.NETCore.App 5.0.0-rc.1.20451.14
Server.csproj
Server appsettings
server validation
Client.csproj
Client appsettings
Client program.cs
Client call
Expected behavior Web-client get's authenticated. Server validates the JWT against AAD.
Actual behavior Web-client get's authenticated. However, the server does not accept the JWT.
www-authenticate: Bearer error="invalid_token", error_description="The signature is invalid"
Additional context / logs / screenshots Just wanted to let you know, but you probably already know this. Hope this is the right repo to report to, or that I did not miss something obvious.
Kind regards, Henrik