gpt4 book ai didi

azure - 将变量组链接到 VSTS 中的 key 保管库时访问被拒绝

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

当我尝试将变量组链接到 VSTS 中的 Key Vault 时,每次我选择端点时,它都会告诉我:

“指定的 Azure 端点需要对所选 key 保管库具有“获取、列出” secret 管理权限。单击“授权”以使 VSTS 能够在 Azure 门户中设置这些权限或管理 secret 权限。”

这没有任何意义。该特定端点具有获取和列出 secret 、 key 、证书的功能。端点正在使用正确的服务主体客户端 ID - 我知道,因为我通过搜索该 ID 在 Azure 中提取了其相应的应用程序注册。应用程序注册专门列在 key 保管库的访问策略中,并具有正确的权限。

尝试在 VSTS 中单击“授权”只需给我

“找不到段“DirectoryDataService.getServicePrincipalsByAppIds”的资源。有关故障排除,请参阅 https://go.microsoft.com/fwlink/?linkid=835898

并且端点已损坏,直到我重新验证为止。

我有点无计可施了 - 一切都设置得完全像 https://learn.microsoft.com/en-us/vsts/build-release/concepts/library/variable-groups?view=vsts说应该是。

编辑:事实证明,当我按对象 ID(应用程序 ID最肯定 在那里不起作用)。所以现在我只需要弄清楚如何将其添加为 ARM 模板中的应用程序...

编辑编辑:太好了...Azure 门户为应用程序注册显示的对象 ID?这不是 ARM 模板想要的对象 ID。它想要……我不知道你会怎么调用它。在 Powershell 中,您可以将其与 -Object ID 一起使用,但是当您列出属性时,它位于“Id”下。任何。为了得到它,你运行

Get-AzureRmADServicePrincipal -SearchString "[your-app-reg-name]"

它显示在Id下。这就是您想要在 ARM 模板中用作对象 ID 的内容。

最佳答案

根据错误未找到“DirectoryDataService.getServicePrincipalsByAppIds”段的资源,该问题似乎与 Azure 端更相关。

要访问 azure-keyvault,您需要四件事:

 - clientId = "<client id of your application registed on Azure AD>";
- domain = "<your talnet id>";
- secret = "<client key of your application registed on Azure AD>";
- subscription = "<your subscription id>";

然后这些将结合 ApplicationTokenCredentials,最后授权给 KeyVaultClient 。建议你看看这个问题:Azure keyvault client 1.0.0 initiate client

enter image description here

此外,还要仔细检查/确认特定端点具有获取和列出 secret 、 key 、证书的权限。

关于azure - 将变量组链接到 VSTS 中的 key 保管库时访问被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49931998/

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