Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
993 views
in Technique[技术] by (71.8m points)

single sign on - AD B2C integration in FreshWorks SSO with OIDC - Login error

I am integrating AD B2C as Identity provider for the FreshWorks by configuring SSO with OIDC in the Freshworks.

Configuration done in the Azure AD B2C:

  1. Registered an application in the AD B2C Tenant

    a. Get the redirect URL from Freshworks SSO with OIDC and added in the Redirect URI in the registered application

    b. Id Tokens and Access Tokens check box is selected.

    c. Enabled the public client.

    d. Generate the client secret for the application

  2. Added Microsoft as external IdP in the AD B2C tenant. Only one external IdP is enabled, local account is not enabled.

  3. Created a SignupSign User flow

  4. Tested the User flow, able to signup and sign-in using Microsoft Account (personal account). JWT token is generated with the claims sub, email, name.

Configuration done in the SSO with OIDC:

  1. Get the ClientId and Client Secret of the Application registered in the AD B2C tenant and added in the SSO with OIDC configuration dialog
  2. Navigate to AD B2C signup sign-in user flow OIDC configuration url and get the authorization_endpoint and token_endpoint, added those two in the SSO with OIDC configuration dialog
  3. set the scopes as openid,email,profile

After doing all the above configurations, a new button is added in the freshworks login page. I have clicked that button, it navigates to the microsoft login page, after providing credentials and accepted the consent, it shows a form with profile information. On clicking the continue button an account is created in the AD and redirected to the Freshwork page. It shows the below error in the freshworks login page.

enter image description here

enter image description here

The authorization code request is working, AD B2C post the authorization code to the freshwork redirect url. I hope the issue is with the get access token endpoint URL. I have tried the Get access token endpoint from the postman using the authorization code received from the first request, it gives the access token.

enter image description here enter image description here

question from:https://stackoverflow.com/questions/65942822/ad-b2c-integration-in-freshworks-sso-with-oidc-login-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Thanks @Saravana. The postman screenshot mentioned is showing the IDToken and your freshworks application expect access token. Could you please validate the user flow with access token settings and also use the postman tool to get the access token. Please follow the below document for more requests.

https://docs.microsoft.com/en-us/azure/active-directory-b2c/openid-connect

Please share fiddler trace to investigate more.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...