我试图通过使用这个https://login.microsoftonline.com/common/oauth2/v2.0/token交换访问令牌
这些参数是有效的:
当我在作用域中添加另一个权限时,比如这个权限:Files.Read.All
。它返回以下消息:
{
"error": "invalid_grant",
"error_description": "AADSTS65001: The user or administrator has not consented to use the application with ID 'bbb71de5-d64e-4ad1-9994-40d0ff295dbb' named 'TeamsAddIn'. Send an interactive authorization request for this user and resource.\r\nTrace ID: 86abe785-dc17-4a3f-9884-ff9582c2cb00\r\nCorrelation ID: b7b8a51a-78bc-410b-861f-ebcb4bd76adc\r\nTimestamp: 2022-05-18 10:51:47Z",
"error_codes": [
65001
],
"timestamp": "2022-05-18 10:51:47Z",
"trace_id": "86abe785-dc17-4a3f-9884-ff9582c2cb00",
"correlation_id": "b7b8a51a-78bc-410b-861f-ebcb4bd76adc",
"suberror": "consent_required"
}
我在应用程序上得到了同意:
并多次同意使用以下内容:https://login.microsoftonline.com/{tenant id}/adminconsent?client_id={client id}&state=12345&redirect_uri={redirect_uri}
我怎么能解决这个问题?
发布于 2022-05-18 12:20:26
使用此url授权访问已工作:https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=<yourClientID>&response_type=token+id_token&redirect_uri=<YourRedirectUri>&scope=user.read+openid+profile+email&response_mode=fragment&state=12345&nonce=678910
https://stackoverflow.com/questions/72287857
复制相似问题