我通過這些 POST 請求登錄到 adls gen 2:https://login.microsoftonline.com//oauth2/v2.0/token請求正文:grant_type:client_credentialsclient_id:來自 App registrations -> Owned applications -> Mu application 的 my_client_idclient_secret:來自 App registrations -> Owned applications -> My application 的 my_client_secret范圍: https: //storage.azure.com/.defaultprovider_type: org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider并獲得成功的響應代碼 200:{ "token_type": "Bearer", "expires_in": 3599, "ext_expires_in": 3599, "access_token": <token>}在我嘗試使用以下 PUT 請求創建文件系統之后: https: //dbmiadlsgen2.dfs.core.windows.net/mydata ?resource=filesystem標頭:授權 - 承載內容類型 - 文本/純 x-ms-version - 2018-11-09并得到以下錯誤: { "error": { "code": "AuthorizationPermissionMismatch", "message": "This request is not authorized to perform this operation using this permission.\nRequestId:bcb4c0d3-901f-00cc-0722-2b7f0c000000\nTime:2019-06-25T06:54:57.3437434Z" }}我從 azure portal: Storage Blob Data Contributor 角色對我的用戶很滿意,但這無濟于事......你覺得我應該用什么樣的角色?是否某些請求正文或標頭參數不正確?謝謝。
1 回答

躍然一笑
TA貢獻1826條經驗 獲得超6個贊
僅將應用程序和帳戶添加為所有者是不夠的,我建議您去您的storage account > IAM > Add role and add the special permission
此類請求,STORAGE BLOB DATA CONTRIBUTOR
.
如需進一步參考,請訪問:
https://learn.microsoft.com/en-us/azure/storage/common/storage-auth-aad-app
希望能幫助到你。
添加回答
舉報
0/150
提交
取消