gpt4 book ai didi

azure - 获取 PnPUnifiedGroup : Code: Authorization_RequestDenied

转载 作者:行者123 更新时间:2023-12-03 02:55:45 26 4
gpt4 key购买 nike

如何使用此命令从图表中获取统一的组

$group = Get-PnPUnifiedGroup -Identity $sitetitle

然后我收到此错误:

Get-PnPUnifiedGroup : Code: Authorization_RequestDenied

尝试与租户用户连接:

## know that this is not going to work
Connect-PnPOnline "https://$tenant-admin.sharepoint.com" -Credentia $cred

并使用具有所有图形权限的 AADDomain

Connect-PnPOnline -AppId $appid -AppSecret $appsecret -AADDomain "$tenant.onmicrosoft.com"

还带有证书..

Connect-PnPOnline -CertificatePath .\xxxxxcertkeyname.pfx -Tenant 'xxxxxxxxxxx.onmicrosoft.com' -ClientId 'xxxxxxx-xxxx-xxx-xxx-xxxxxx' -Url 'https://xxxxxxxx-admin.sharepoint.com' 

但无法上类

最佳答案

您应该连接到特定范围

Connect-PnPOnline "https://$tenant-admin.sharepoint.com" -Scope "Group.Read.All" -Credentia $cred

-Scope "Group.Read.All"-Scope "Group.ReadWrite.All", "Directory.ReadWrite.All"(如果您计划更改)任何组

图形 API 的可用权限 https://github.com/microsoftgraph/microsoft-graph-docs/blob/master/concepts/permissions_reference.md

关于azure - 获取 PnPUnifiedGroup : Code: Authorization_RequestDenied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52895461/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com