简体   繁体   English

无法在 Azure 中使用 ServicePrincipal 凭据获取应用程序

[英]Unable to get Application using ServicePrincipal Credentials in Azure

I have a Service Principal created which has contributor access.我创建了一个具有贡献者访问权限的服务主体。 I have a user which also has contributor access.我有一个用户也有贡献者访问权限。

When i login to powershel using ServicePrincipal credentials and run this command i am getting insufficient privileges error.当我使用 ServicePrincipal 凭据登录到 powershel 并运行此命令时,出现权限不足错误。

Get-AzADApplication|Select-Object DisplayName, ObjectId

When i login to powershel using User Credentials and run the same command i am getting the results.当我使用用户凭据登录 powershel 并运行相同的命令时,我得到了结果。

DisplayName                                                                      ObjectId                            
-----------                                                                      --------                            
App1                                                                      XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX
App2                                                                      XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX

in azure there are two kind of roles:在 azure 中有两种角色:

I guess that to run your command you need the second category and your principal is currently, as you said, only a contributor.我猜想要运行您的命令,您需要第二类,而您的委托人目前正如您所说,只是一个贡献者。

So you should assign an AD role to your principal based on what you need to do and retry.因此,您应该根据需要执行的操作为委托人分配一个 AD 角色,然后重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure SQL 使用 PowerShell 和 ServicePrincipal 为 AD 用户授予访问权限 - Azure SQL Grant Access for AD User using PowerShell and ServicePrincipal 如何使用 java 在 azure 中获取应用程序的特定密码凭证结束日期 - How to get specific password credentials end-date of an application in azure using java Azure AD Graph API-将具有角色的组分配给租户的应用程序(ServicePrincipal) - Azure AD Graph API - Assigning a group with role to a tenant's application (ServicePrincipal) 使用 sbt 将 scala 项目发布到 azure 提要:无法找到凭据 - Publish scala project to azure feed using sbt: Unable to find credentials for 数据工厂中用于Azure Datalake分析的Serviceprincipal模板 - Serviceprincipal template for Azure Datalake analytics in datafactory ELMAH - 从Azure应用程序设置中获取SMTP凭据 - ELMAH - Get SMTP credentials from Azure Application Settings 无法在 Azure 应用程序洞察中获取进程 CPU - Unable to get Process CPU in Azure application insight 多租户应用的Azure AD Graph对象ID对于每个租户是唯一的,如何动态获取servicePrincipal ID? - Azure AD Graph object ID of multi-tenant app is unique per tenant, how do I get the servicePrincipal ID dynamically? 从Azure获取kubernetes凭据 - Get kubernetes credentials from Azure Azure 通过 REST 请求使用用户凭据获取访问令牌 - Azure get access token using user credentials via REST requests
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM