[英]Azure Data Lake Storage Gen2 access token generation - "AADSTS65001: The user or administrator has not consented to use the application with ID
[英]Managed Service Identity configuration for Azure Data Lake Storage Gen2
尝试通过控制台中的Hadoop客户端使用MSI(Azure托管身份)连接到Azure Data Lake Storage Gen2并收到错误ls: AADToken: HTTP connection failed for getting token from AzureAD. Http response: 400 Bad Request*
ls: AADToken: HTTP connection failed for getting token from AzureAD. Http response: 400 Bad Request*
通过共享密钥连接可以正常工作。
做了什么:
要使用以下命令进行连接:
hadoop fs -Dfs.azure.ssl.channel.mode=Default_JSSE -Dfs.azure.account.oauth.provider.type=org.apache.hadoop.fs.azurebfs.oauth2.MsiTokenProvider -Dfs.azure.account.auth.type=OAuth -Dfs.azure.account.oauth2.msi.tenant=<tenant_ID> -Dfs.azure.account.oauth2.client.id=<Client_ID> -ls abfss://<filesystem_name>2@<storage_account_name>.dfs.core.windows.net/
有什么问题或遗漏吗? 请指教。
谢谢!
添加我的评论作为答案:
无需执行步骤3,如果启用了VM的MSI,它将在您的租户中自动创建一个服务主体,它与VM的名称相同,具有自己的客户端ID。 您可以在门户的Azure Active Directory中找到它->企业应用程序->使用您的VM名称搜索(使用All Applications
过滤)。
在第5步中,您需要为MSI提供Storage Blob Data Owner
角色。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.