Is there an existing issue for this?
Describe the bug
The effect: the access token is not able to be fetched from BCP because the redirect uri is not in the allowable list of uris as configured by Azure AD B2C.
We are using Azure AD B2C and it does not allow having the # symbol in the allowed redirect uris, specifically when the signinaudience is AzureADandPersonalMicrosoftAccount for the oauth2 implicit flow.
And if we can't put the #/oauth uri in the allowed redirect uri list, Azure AD will not allow BCP to receive the token.
Image of the Azure AD B2C error
Affects HC 12.16, but not 12.15.* due to new major version of BCP.
Steps to reproduce
- Boot up a C# project running 12.16 of HotChocolate.
- Navigate to the graphql endpoint and try to authenticate by clicking the gear icon.
- Under authentication, select OAuth2 -> Implicit.
- Note that the Redirect URL is hardcoded and not allowed to be changed.
Using Azure AD B2C App Registration, the redirect uri cannot contain a fragment uri if the signinaudience value is AzureADandPersonalMicrosoftAccount. If it is AzureADMyOrg, then the fragment uri is acceptable.
Allowed settings for signinaudience: AzureADMultipleOrgs, AzureADMyOrg, AzureADandPersonalMicrosoftAccount, PersonalMicrosoftAccount
Relevant log output
No response
Additional Context?
As per discussion in #announcements on Jan 6, 2023.
Product
Hot Chocolate
Version
12.16.*
Is there an existing issue for this?
Describe the bug
The effect: the access token is not able to be fetched from BCP because the redirect uri is not in the allowable list of uris as configured by Azure AD B2C.
We are using Azure AD B2C and it does not allow having the # symbol in the allowed redirect uris, specifically when the signinaudience is
AzureADandPersonalMicrosoftAccountfor the oauth2 implicit flow.And if we can't put the #/oauth uri in the allowed redirect uri list, Azure AD will not allow BCP to receive the token.
Image of the Azure AD B2C error
Affects HC 12.16, but not 12.15.* due to new major version of BCP.
Steps to reproduce
Using Azure AD B2C App Registration, the redirect uri cannot contain a fragment uri if the signinaudience value is AzureADandPersonalMicrosoftAccount. If it is AzureADMyOrg, then the fragment uri is acceptable.
Allowed settings for signinaudience: AzureADMultipleOrgs, AzureADMyOrg, AzureADandPersonalMicrosoftAccount, PersonalMicrosoftAccount
Relevant log output
No response
Additional Context?
As per discussion in #announcements on Jan 6, 2023.
Product
Hot Chocolate
Version
12.16.*