Hi,
I have the following.
PowerShell: 7
Graph Module: 1.11.0
Sharepoint Site: ITTeam
Graph Authentication: Application Authentiation with the following scope
Sites.Selected
Sites.Read.All
Sites.Manage.All
User.Read.All
Mail.Send
Chat.ReadWrite.All
Sites.FullControl.All
Chat.Create
When I run the following code, I got no result
$SiteName=get-mgsite -Search 'it team'
Get-MgSitePermission -SiteID $SiteName.id
When I run the Get-MgSitePermission with debugging, it seems that the graph is not returning any value.
PS D:\Powershell\> get-mgsitepermission -Debug -siteid $SiteName.id
DEBUG: [CmdletBeginProcessing]: - Get-MgSitePermission begin processing with parameterSet 'List1'.
DEBUG: [Authentication]: - AuthType: 'UserProvidedAccessToken', AuthProviderType: 'UserProvidedToken', ContextScope: 'Process', AppName: 'PSHelpdeskBot'.
DEBUG: [Authentication]: - Scopes: [Sites.Selected, Sites.Read.All, Sites.Manage.All, User.Read.All, Mail.Send, Chat.ReadWrite.All, Sites.FullControl.All, Chat.Create].
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://graph.microsoft.com/v1.0/sites/mydomainhere.sharepoint.com%2C6440xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-80894f585fbd/permissions
Headers:
SdkVersion : graph-powershell/1.11.0,Graph-dotnet-1.25.1
FeatureFlag : 00000047
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.14393; en-US),PowerShell/2022.6.3,Get-MgSitePermission_List1
Accept-Encoding : gzip
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Cache-Control : no-store, no-cache
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 55d6d051-4e69-48bf-9cdf-df3e90623faa
client-request-id : 55d6d051-4e69-48bf-9cdf-df3e90623faa
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"South India","Slice":"E","Ring":"2","ScaleUnit":"000","RoleInstance":"MA1PEPF00002027"}}
Link : <https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01>;rel="deprecation";type="text/html",<https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01>;rel="deprecation";type="text/html"
Deprecation : Fri, 03 Sep 2021 23:59:59 GMT
Sunset : Sun, 03 Sep 2023 23:59:59 GMT
OData-Version : 4.0
Date : Tue, 09 Aug 2022 12:29:42 GMT
Body:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('mydomainhere.sharepoint.com%xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4f2f-a824-80894f585fbd')/permissions",
"value": []
}
DEBUG: [CmdletEndProcessing]: - Get-MgSitePermission end processing.