MicrosoftIdentityOption.ReturnUrlParameter does not appear to work
Issue moved from dotnet/aspnetcore#45024
- Please respond to @ShaunCurtis.
From @ShaunCurtis on Friday, November 11, 2022 10:19:49 AM
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
[Most likely a documentation problem on how it works]
Context: Blazor Server Template with Authentication in VS2022. Application running in debug mode.
Relevant AppSettings section:
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
... relevant Domain, Secret and ID parameters to make it work
"ReturnUrlParameter": "custompath",
"AccessDeniedPath": "/",
},
Relevant Program Section:
services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(Configuration.GetSection("AzureAd"))
.EnableTokenAcquisitionToCallDownstreamApi(initialScopes)
.AddMicrosoftGraph(Configuration.GetSection("DownstreamApi"))
.AddInMemoryTokenCaches();
services.AddAuthorization();
Run up the app and manually call
https://localhost:5001/MicrosoftIdentity/account/signin?custompath=%2fcounter
Expected Behavior
It should, if I understand the documentation correctly, run through the login process and then take me back to the counter page.
It doesn't, it returns to /. What am I missing from the documentation?
Steps To Reproduce
See the decription
Exceptions (if any)
No response
.NET Version
7.0.100
Anything else?
VS2022 Community Net6.0 Windows10 Blazor server template with Azure ADB2C Authentication.
Issue moved from dotnet/aspnetcore#45024
- Please respond to @javiercn.
From @javiercn on Friday, November 11, 2022 10:28:29 AM
@ShaunCurtis thanks for contacting us.
/cc @jmprieur
Hello all, Is there any update on this? Seems it's been inactive for a month, now
Sorry for not responding. I believe we were waiting for a repro. closing, but please reopen if this is an issue still with the 3.0.1 version. Thanks.