首页 > 解决方案 > Azure Active Directory - 获取租户列表

问题描述

我知道 Powershell cmdlet Get-AzTenantREST API 调用 GET https://management.azure.com/tenants?api-version=2019-06-01来查询 AD 租户 wrt 当前用户上下文。

由于这需要使用 Azure 资源管理的 user_impersonation,是否有替代方法,即 Microsoft Graph?

使用此租户列表的示例

标签: azurepowershellazure-active-directorymicrosoft-graph-api

解决方案


No, there is no such API in Microsoft Graph or Azure AD Graph.

I want to use the an API that needs less permissions than user_impersonation wrt management.azure.com.

Besides, I think the delegated permission user_impersonation is not large, when the user login the app and consent the permission, the app just calls the API as the user. The permissions are all from and decided by the user, not the app.


推荐阅读