I face difficulties to use Microsoft Entra External ID to authenticate a Blazor Web App
I tried both example code: Azure-Samples/ ms-identity-ciam-dotnet-tutorial
and dotnet/ blazor-samples
I cannot run the samples in .Net 9.
I have managed to login succesfully (I get an annoying error message, but it does not throw an error: Could not read source map for https://aadcdn.msftauth.net/shared/1.0/content/js/oneDs_f2e0f4a029670f10d892.js: Unexpected 404 response from https://aadcdn.msftauth.net/shared/1.0/content/js/oneDs_f2e0f4a029670f10d892.js.map:
BUT I cannot logout!
I place a link: <a href="MicrosoftIdentity/Account/SignOut">Logout</a>
and when I hit it I get the following exception:
TypeError: The provided value cannot be converted to a sequence.
Stack trace:
> at Object._oX (https://logincdn.msauth.net/16.000/content/js/MeControl_yl3C2NknpDMsGqlCvzLtmA2.js:1:15546)
> at https://logincdn.msauth.net/16.000/content/js/MeControl_yl3C2NknpDMsGqlCvzLtmA2.js:1:15195
I made the following adaptations:
- appsettings.json:
"Domain": "azureefce.onmicrosoft.com", "TenantId": "a73...-54ff1faab232", "ClientId": "09e...1dab20", "CallbackPath": "/signin-oidc", "Instance": "https://a73...232.ciamlogin.com/", "ResponseType": "code"
- In App Registration I used mobile and desktop profile with url: https://localhost/signin-oidc
All other options failed (i.e. SPA or Web)
Can anyone help?