How to fix this issue?

Sonam K 20 Reputation points
2024-07-16T02:50:08.8166667+00:00

Hi. I am trying to use Azure AD B2C for my application. I created an app and selected the option to use multi-tenant as well as personal accounts. In the identity provider, I used Microsoft Account, but only personal Microsoft accounts are working and not my company's email accounts. Do you have any idea how to resolve this? Do we need to change some configuration to make it work for official Microsoft accounts as well?

Error: while using Company's email address:

https://evonsys22.b2clogin.com/evonsys22.onmicrosoft.com/oauth2/authresp?error=server_error&error_description=AADB2C90289%3a+We+encountered+an+%27invalid_client%27+error+connecting+to+the+identity+provider.+Please+try+again+later.%0d%0aCorrelation+ID%3a+ffff0a41-f1de-4f06-a13e-31daa58f677a%0d%0aTimestamp%3a+2024-07-15+20%3a06%3a52Z%0d%0a

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,655 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,162 questions
{count} votes

Accepted answer
  1. Navya 12,405 Reputation points Microsoft Vendor
    2024-07-16T11:13:32.2+00:00

    Hi @Sonam K

    Thank you for posting this in Microsoft Q&A.

    I understand that you have created multi-tenant application in azure ad b2c but while using Microsoft accounts you are getting error "AADB2C9028 - encountered an 'invalid_client' error connecting to the identity provider. Please try again later".

    The error message "invalid_client" usually indicates that the client ID or client secret is incorrect or has expired. To resolve this issue, you can try the following steps:

    1. Verify the client ID and client secret in your Azure AD B2C policy to ensure they are correct and have not expired. You can locate the client ID and client secret in the "Keys" section of your Azure AD B2C application registration.
    2. Check the expiration date of the client secret. If the client secret has expired, you will need to generate a new one and update your Azure AD B2C policy with the new value.
    3. . Can you check metadata URL in the configuration of Identity Provider. The format of the metadata URL is similar to https://login.microsoftonline.com/your-tenant/v2.0/.well-known/openid-configuration, where your-tenant is your Microsoft Entra tenant name.

    For your reference: Setup multitenant application in Azure AD B2C

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.