Calling a azure web api with bearer token, received 401 unauthorized

Ernesto 61 Reputation points
2024-05-08T11:42:23.6533333+00:00

Hi, when I try to call a web api with a scope policy enforced; I receive a 401 unauthorized.

How should I configure web api and the get request?

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

3 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Ernesto 61 Reputation points
    2024-05-08T13:49:27.99+00:00

    where can I verify ValidAudiencies ? in the manifest?

    0 comments No comments

  3. Marilee Turscak-MSFT 37,206 Reputation points Microsoft Employee Moderator
    2024-05-09T00:35:25.92+00:00

    Hi @Ernesto ,

    To add to the previous comments, it seems Forecast.WriteScope is the current scope or one of the permissions in the token based on what you shared. But based on the error, it sounds like the Forecast.WriteScope permission will not be enough to call the API and you might need more permissions.

    To further isolate, we need to understand what you are trying to achieve (which API you are calling, what kind of policy you are trying to create, whether it is a mapping policy, how are you trying to get the access tokens, and what API permissions are you using), and the configuration of how you are calling the API.

    0 comments No comments

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.