Unable to get and set the token after logged-in from B2C

Ayush Kumar Sharma 40 Reputation points
2024-03-18T11:15:25.78+00:00

We have created /Added APIs in API Management and we have secured our APIs using Azure AD B2C identity provider.

After that we are using developer portal to use the APIs.

When we are logged-in with Azure AD B2C, we are able to log-in, but we need token when we logged-in using Azure AD B2C.

When we logged-in we don't want to pass Authorization header when we call the API.

We want that when we logged-in with B2C the token provided by B2C, should be automatically/dynamically set into 'Header'.

Do we have any possible solution regarding this.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,336 questions
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 29,236 Reputation points
    2024-03-18T15:45:51.5166667+00:00

    @Ayush Kumar Sharma Thanks for reaching out. From the description i understand that you have integrated Azure AD B2C identity provider with your APIM developer portal and wants the token obtained during the authentication process to be automatically added to the Authorization header of outgoing requests.

    But logging in to the developer portal and accessing the APIs are two different scenarios and require different tokens. The token obtained during the authentication process is used for authentication purposes only and cannot be used to access the APIs directly.

    Do let me know if you have any queries.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments

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.