Aad auth callback url does gives Exception: Correlation failed.
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Developing dotnet core service with endpoint like : http://localhost:86/controller/api(param)
Overall flow aim is
1. User enters full url in browser http://localhost:86/controller/api(param)
2. Users navigate to AAD login page
3. After successful log in redirect back to “controller/api(param)”
AAD app asks to specify redirect url in AAD app portal and these urls can’t be dynamic like “controller/api(param) since param can take any value.
What I have tried so far is :
In middle ware added
httpContext.ChallengeAsync(
new AuthenticationProperties
{
RedirectUri = "/controller/callback",
});
And in OIDC added
services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
.AddAzureAD(options =>
{
options.Instance = authConfig.AzureAdInstance;
options.Domain = "microsoft.onmicrosoft.com";
options.TenantId = authConfig.AzureAdTenantId;
options.ClientId = authConfig.AzureAdClientId;
options.CallbackPath = "controller/checksignin";
});
AAD portal has redirect url set to "controller/checksignin";
With this combination, after login page call fails in landing on action " controller/checksignin ";
shows error below


Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.