0

I have a simple function app with HTTP trigger: Function app code snippet

I have authorized my function app with AAD. I am able to get the access token successfully from v2 token url https://login.microsoftonline.com/<TENENT_ID>/oauth2/v2.0/token

In scope I am passing the Application ID URI from app registration.

Access token

But when I am trying to pass the access token in header while invoking function app url, I am getting 401. 401 postman

Not sure what I am missing. Please help

1 Answers1

1

I think my previous post would be helpful. Let me know if you have any more questions.

If this solution does not work for you,and scope param is necessary for you, I have checked your post, seems everything is right. I assume it is due to Auth config ,could you pls have a check?Go to Azure function => Auth => identity provider => find your app => Edit.

I'll share my config and steps to call function below:

My config: enter image description here

The way I get the access token : enter image description here

Not bring token: enter image description here

Use this token to call Azure function :

enter image description here

Stanley Gong
  • 11,522
  • 1
  • 8
  • 16