为了账号安全,请及时绑定邮箱和手机立即绑定

ADLS Gen-2。从关于邮递员创建新文件系统的 PUT 请求中获取 Authorization

ADLS Gen-2。从关于邮递员创建新文件系统的 PUT 请求中获取 Authorization

蝴蝶刀刀 2023-02-16 15:50:38
我通过这些 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

希望能帮助到你。



查看完整回答
反对 回复 2023-02-16
  • 1 回答
  • 0 关注
  • 129 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号