1
votes

I'm having issues with using tokens to access my Azure Web API. I followed this documentation from Microsoft.

I can successfully request an access token by doing a POST request to the authorization token endpoint:

https://login.microsoftonline.com/{Tenant ID}/oauth2/token

My POST body:

client_id:( Web API client ID )
client_secret:( Web API client Secret )
grant_type:password
username:userName
password:*******
resource:sharepoint.com

I'm using POSTMAN to test my calls and when I try to access my API using that returned token from above, I get a 401 unauthorized.

1

1 Answers

0
votes

Was a configuration issue inside my WebConfig file.