Azure Service Principal Roles Assigned To返回空 [英] Azure Service Principal Roles Assigned To is returning empty

查看:91
本文介绍了Azure Service Principal Roles Assigned To返回空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Azure AD中注册了Azure Web App,并在App Registration清单中定义了一些角色。然后我为这些角色分配了一些AD组和用户。


现在我正在尝试获取分配给每个App角色的对象和用户列表。我正在尝试两者,以编程方式(.Net C#)和powerShell。在这两种情况下,RolesAssignedTo都会返回Empty。


任何想法?


在PowerShell中我正在使用  Get-AzureADServiceAppRoleAssignedTo


在C#中我正在使用AAD Graph API,我能够获取Service Principal对象,我看到Roles定义,但AssignedTo为空。


任何人都试过这样的事情?


谢谢!




解决方案

Get-AzureADServiceAppRoleAssignedTo为您提供"应用程序权限"。已分配给此服务主体,因为应用程序权限分配在目录中表示为appRoleAssignments,并且我能够按预期获得命令的输出
-


请检查  列出目录中所有服务主体的所有应用程序角色分配  if
这有助于找到你想要的东西。


I have an Azure Web App registered in Azure AD and I defined a few roles in the App Registration manifest. Then I assigned some AD Groups and Users to those Roles.

Now I'm trying to get the list of objects and users assigned to each App role. I'm trying both, programatically (.Net C#) and powerShell. In both cases, the RolesAssignedTo returns Empty.

Any ideas?

In PowerShell I'm using Get-AzureADServiceAppRoleAssignedTo

In C# I'm using AAD Graph API and I'm able to get the Service Principal object where I see the Roles definitions but the AssignedTo is empty.

Anyone has tried something like this?

Thanks!


解决方案

Get-AzureADServiceAppRoleAssignedTo gives you what "Application permissions" have been assigned to this Service Principal as Application permission assignments are represented as appRoleAssignments in the directory and I am able to get the output of the command as expected -

Please check List all application role assignments for all service principals in your directory if this helps to get you what you are looking for.


这篇关于Azure Service Principal Roles Assigned To返回空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆