Redirect uri in Azure B2C with query string. Error detail: URL may not contain a query string

2.4k views Asked by At

I'm trying to use Azure B2C OAuth for Alexa account linking with implicit flow.Below is the redirect url from Alexa

https://alexa.amazon.co.jp/spa/skill/account-linking-status.html?vendorId=XXXXXXXXXX

But adding this gives below error in Azure B2C app.

Failed to update xxx-xxxxxxapp application. Error detail: URL may not contain a query string

I tried below link for solving this but its not working https://blogs.aaddevsup.xyz/2018/04/query-string-is-not-allowed-in-redirect_uri-for-azure-ad/

I also tried auth code grant flow with SPA in B2C. That is also not working with Alexa as it has PKCE - https://github.com/MicrosoftDocs/azure-docs/issues/64073

Anyone succeeded in creating this?

2

There are 2 answers

0
Randy On

You can add your own redirection service such that B2C redirects to your service which then redirects to the final application adding any needed query parameters that can be extracted from the B2C claims.

1
Christopher Norris On

Adding URL parameters isn't allowed in Azure AD B2C.

The document you linked also provides that you use the state parameter. The problem with this is that your Amazon Alexa requires a vendor Id URL parameter.