【发布时间】:2020-10-28 20:03:05
【问题描述】:
我想创建一个具有特定 GraphAPI 权限的应用程序。我想自动完成,所以 powershell 是我的选择。唯一缺少的是 GraphAPI 权限的 GUID,在超级棒的 Microsoft 文档中找不到。
我从其他几个已经问过(并标记为已回答大声笑)的问题中收集到的是:
Connect-AzAccount -Credential $psCred -TenantId $azureTenantId -ServicePrincipal
$graph = Get-AzADServicePrincipal -ApplicationId "00000003-0000-0000-c000-000000000000"
$graph.AppRoles
这应该会给我一个 GraphAPI 必须提供的所有应用程序权限的列表。 不幸的是,我收到的对象中不存在 $graph.AppRoles(neither $graph.Oauth2Permissions)。 (我知道委派权限和应用程序权限之间的区别,它们位于 Oauth2Permissions/AppRoles 属性中。)
有什么建议吗?
【问题讨论】:
-
请参考这个GitHub,如果有帮助请告诉我们
-
@SruthiJ-MSFTIdentity 这有点矫枉过正。我接受了 Allen Wu 的回答,并对其进行了一些调整。谢谢!
标签: powershell permissions azure-active-directory microsoft-graph-api