有没有办法通过图形资源管理器API获取所有应用程序的主列表

问题描述 投票:2回答:1

在Azure Active Directory管理中心,我可以在企业应用程序下看到近200个应用程序。如何通过Microsoft图形资源管理器获取此信息?

我尝试了这个:https://graph.microsoft.com/beta/applications,但它给了我应用程序注册下的应用程序列表。

如何通过图形浏览器获取企业应用程序下的所有应用程序列表?

azure-active-directory microsoft-graph sharepoint-online
1个回答
0
投票

Microsoft Graph API

我首先分享这些内容,因为您在问题中专门询问了Microsoft Graph API。

请注意,List ServicePrincipals api仅在Beta端点下可用。测试端点中的API可能会发生变化。 Microsoft不建议您在生产应用程序中使用它们。我在下一节中分享了替代API。

获得完整列表

https://graph.microsoft.com/beta/servicePrincipals

如果你需要过滤到只有“应用程序类型”是“企业应用程序”的那些,如Azure门户允许(截图如下)

https://graph.microsoft.com/beta/servicePrincipals?$filter=tags/any(t:t eq 'WindowsAzureActiveDirectoryIntegratedApp')

Azure AD Graph API

尽管在大多数情况下建议使用较新的Microsoft Graph API,但这种特殊情况使得Microsoft Graph API v1.0尚不支持此功能,因此对于生产应用程序,您应该使用Azure AD Graph API。在这里阅读更多信息Microsoft Graph or Azure AD Graph

完整清单

https://graph.windows.net/myorganization/servicePrincipals

过滤到只有“应用程序类型”是Azure门户允许的“企业应用程序”的那些

https://graph.windows.net/myorganization/servicePrincipals?$filter=tags/any(t:t eq 'WindowsAzureActiveDirectoryIntegratedApp')

另外,还要考虑使用其他查询参数(如$top)来说明前5和$select只选择那些真正需要的字段。例:

https://graph.microsoft.com/beta/servicePrincipals?$select=appid,appDisplayName&$top=5
© www.soinside.com 2019 - 2024. All rights reserved.