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:
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
Added Microsoft as external IdP in the AD B2C tenant. Only one external IdP is enabled, local account is not enabled.
Created a SignupSign User flow
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:
Get the ClientId and Client Secret of the Application registered in the AD B2C tenant and added in the SSO with OIDC configuration dialog
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
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.
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.
Please let me if there is any issue in the configuration. If you need additional details, please let me know. Help me to resolve this issue.
Page 1 / 1
Hi @saravana,
Apologies for the delay in getting back here. We can see that your query on the Single Sign-on feature has been addressed by our support team via a ticket. Please feel free to write to support@freshdesk.com for any further queries in the future and we would be happy to help! :)
Could you please let us know if you have any issues with configuring Single sign-on for your Freshdesk account @geebranz?
Cheers,
Freshdesk Community Team
@saravana@hemanth.ramya
I am facing the exact same error integrating Freshworks SSO with Azure B2C.
What is the fix here?
@saravana@hemanth.ramya
I am facing the exact same error integrating Freshworks SSO with Azure B2C.
What is the fix here?
Add the Application Client id (Application registered in the B2C AD tenant) in the Scope field in Freshdesk OAuth configuration.
Thanks @saravana
The fix worked. This seriously needs to be documented somewhere.
Thanks for sharing your insights, @saravana.
Glad to know that the issue is fixed. @sahilshah50. Sure, we have noted your feedback at our end. Feel free to drop a note here or write to support@freshdesk.com for any further queriesand we would be happy to help!
Cheers,
Freshdesk Community Team
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.
However, you need to adjust the returned values as the example uses a param that Freshdesk does not expect, the example returns ‘signInNames.emailAddress’ instead of ‘email’.
In the policy you need to adjust the input to change the output (really confused me that part).
It seems like the issue you're encountering might be related to the configuration of the access token endpoint URL in the SSO with OIDC settings. Here are a few steps you can take to troubleshoot:
Double-check that the access token endpoint URL obtained from the AD B2C signup sign-in user flow OIDC configuration matches the one configured in the SSO with OIDC settings in Freshworks.
Ensure that the scopes configured in Freshworks match the ones defined in the AD B2C signup sign-in user flow OIDC configuration (openid, email, profile).
Verify that the Client ID and Client Secret configured in Freshworks match the ones obtained from the application registered in the AD B2C tenant.
Test the access token endpoint URL using tools like Postman to ensure it returns a valid access token when provided with the authorization code received from the initial request.
Check for any errors or logs in the Freshworks configuration that might provide more insight into the issue.
By following these steps, you should be able to identify and resolve the issue with the access token endpoint URL configuration in Freshworks for SSO with OIDC integration with Azure AD B2C.