Marcelo Nunes
Marcelo Nunes

Reputation: 73

Pass parameter to Identity Provider on Azure Ad B2C

I am using Azure AD B2C as an authentication portal. I am trying to guarantee that the Google+ always goes to select account page, by sending the query parameter prompt=select_account. But I am having an hard time reaching this behavior.

From google documentation, https://developers.google.com/identity/protocols/OpenIDConnect, it's possible to receive this parameter, which will guarantee that user goes to select account.

When following the documentation, https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow, it seems that the prompt doesn't reach google, assuming the last authentication.

Upvotes: 2

Views: 3509

Answers (1)

Jas Suri - MSFT
Jas Suri - MSFT

Reputation: 11325

If you want to append a static query parameter to the Auth Request that B2C makes to Google, then you need to use a Custom Policy. In which you can configure an OAuth provider for Google, and add an input claim for your query parameter.

https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-get-started-custom?tabs=applications

https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-custom-setup-goog-idp?tabs=applications

      <InputClaims>
        <InputClaim ClaimTypeReferenceId="QueryParamName" DefaultValue="ValueToSend"/>
      </InputClaims>

Upvotes: 7

Related Questions