我在使用 token 访问 Azure Web API 时遇到问题。我关注了this documentation from Microsoft 。
我可以通过向授权 token 端点发出 POST 请求来成功请求访问 token :
https://login.microsoftonline.com/{Tenant ID}/oauth2/token
我的帖子正文:
client_id:( Web API client ID )
client_secret:( Web API client Secret )
grant_type:password
username:userName
password:*******
resource:sharepoint.com
我正在使用 POSTMAN 来测试我的调用,当我尝试使用上面返回的 token 访问我的 API 时,我收到 401
未经授权。
最佳答案
我的 Web 配置文件中存在配置问题。
关于azure - Azure Web API 的身份验证 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36895139/