我想借助之前獲得的重繪 令牌來獲取訪問令牌。
我使用范圍獲得令牌:user.read offline_access openid在 oauth2 端點中:
https ://login.microsoftonline.com/tenant.com/v2.0/token
幾個小時后,訪問令牌過期。現在我正在嘗試使用重繪 令牌來獲取它。
但我沒有成功,非常需要任何幫助。
uj5u.com熱心網友回復:
我試圖在我的環境中重現相同的結果并得到以下結果:
我創建了一個 Azure AD 應用程式并添加API permissions如下:

使用以下引數,我得到了tokensvia Postman:
POST https://login.microsoftonline.com/tenantID/oauth2/v2.0/token
client_id:appID
grant_type:authorization_code
scope:https://graph.microsoft.com/.default
client_secret:client_secret
code:code
redirect_uri:https://jwt.ms
回復:

為了使用上述重繪 令牌獲取訪問令牌,請將授權型別更改為refresh_token.
我使用帶有如下引數的重繪 令牌成功獲得了訪問令牌:
POST https://login.microsoftonline.com/tenantID/oauth2/v2.0/token
client_id:appID
grant_type:refresh_token
refresh_token: 0.AVYA_in0zaI3eUqOQHrbrD-FUv //paste the refresh token that you got above
client_secret:client_secret //Mandatory if client is web app
回復:

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/516666.html
標籤:天蓝色天蓝色活动目录
上一篇:無法從AzureAPI檢索令牌
