B2C Token for 3rd Party Vendors

skhsjdksjdn-6642 41 Reputation points
2022-02-22T22:45:46.847+00:00

We have a 3rd party vendor trying to use our API's. Our API's are protected and are using AD B2C. How can I get a token and use it for authentication? Is there any documentation (or) sample apps for it? Can someone share some info on it?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,886 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 29,751 Reputation points Microsoft Employee
    2022-02-28T10:29:53.283+00:00

    Hi @Edenred-6642,

    Thanks for reaching out and apologies for delay in response.

    I understand that you are looking for samples to call protected Web API secured using Azure AD B2C.

    1. To call the web API secured using Azure AD B2C, 3rd party vendor’s application also need to register in Azure AD B2C.
    2. To get the valid access token issued by Azure AD B2C, all the users of third-party vendor need to authenticate with Azure AD B2C with required permission.
    3. Further, Pass the token as ‘Bearer Token’ in authorization header which validates the token and permissions to access your protected web API.

    Refer the below samples based on your scenario to call web API protected by Azure AD B2C.

    https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-web-api?tabs=csharpclient
    https://learn.microsoft.com/en-us/azure/active-directory-b2c/integrate-with-app-code-samples#web-apps-and-apis

    Thanks,
    Shweta

    ------------------------------------------------------------

    Please remember to "Accept Answer" if answer helped you.


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.