ADLS GEN-2.从put requst中获取有关邮递员创建新文件系统的授权persionmissionmismat



i通过以下帖子请求登录到adls gen 2:

https://login.microsoftonline.com//oauth2/v2.0/token

请求主体:

grant_type:client_credentials

client_id:my_client_id来自应用程序注册 ->拥有的应用程序 -> MU应用程序

client_secret:my_client_secret从应用程序注册 ->拥有 应用程序 ->我的应用程序

范围:https://storage.azure.com/.default

provider_type: org.apache.hadoop.fs.azurebfs.oauth2.cletcredcredstokenprovider

并获得成功响应代码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

获取Folloing错误:

    {
        "error": {
            "code": "AuthorizationPermissionMismatch",
            "message": "This request is not authorized to perform this operation using this permission.nRequestId:bcb4c0d3-901f-00cc-0722-2b7f0c000000nTime:2019-06-25T06:54:57.3437434Z"
        }
}

我从Azure Portal那里获得了用户:存储BLOB数据贡献者角色,但没有帮助...

您如何看我应该使用什么样的角色?某些请求主体或标题参数不正确吗?谢谢。

它不足以使该应用程序和帐户作为所有者添加,我建议您转到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

希望它有帮助。

相关内容

最新更新