gpt4 book ai didi

azure - 使用 Azure 功能的命令需要哪些 Azure 角色/权限

转载 作者:行者123 更新时间:2023-12-03 03:33:05 25 4
gpt4 key购买 nike

我创建了一个解决方案,当使用“创建者”、“日期”和“时间”创建 Azure 中的所有资源时,该解决方案将自动标记这些资源。如果有人从网络界面创建,这些功能就可以完美工作。不幸的是,我使用 Terraform 创建资源,并希望它获取 terraform appid 并使用以下命令将其转换为名称。

(Get-AzADServicePrincipal -ApplicationId "123456-4564-464651651").DisplayName 

不幸的是,我收到以下错误,基本上是说我没有权限执行此操作。是否有一个列表可以让我知道哪些角色对应于我需要运行的命令?我只想允许映射服务原则应用程序 ID 显示名称的权限(仅此而已)。

[Error] ERROR: [Authorization_RequestDenied] : Insufficient privileges to complete the operation.Exception             :Type    : System.ExceptionMessage : [Authorization_RequestDenied] : Insufficient privileges to complete the operation.HResult : -2146233088CategoryInfo          : InvalidOperation: ({ ConsistencyLevel …ect = , Expand =  }:<>f__AnonymousType5`7) [Get-AzADServicePrincipal_List], ExceptionFullyQualifiedErrorId 

该解决方案基于此链接,使用事件触发器 https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/tagging-azure-resources-with-a-creator/ba-p/1479819

最佳答案

您至少应该拥有 Application.Read.All 权限,请参阅文档以获取更多信息 - https://learn.microsoft.com/en-us/graph/api/serviceprincipal-get?view=graph-rest-1.0&tabs=http

enter image description here

希望这有帮助

谢谢

关于azure - 使用 Azure 功能的命令需要哪些 Azure 角色/权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74283170/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com