ThomasKur / M365Documentation

Automatic Microsoft 365 Documentation to simplify the life of admins and consultants.
Other
300 stars 45 forks source link

Forbidden - Graph error? #39

Closed i-windows closed 5 months ago

i-windows commented 10 months ago

Windows 11. PS Version 7.2.15 follow install instructions grant permissions as required..

image

connect-m365doc $doc = Get-M365Doc -Components Intune -ExcludeSections "MobileAppDetailed"

the below error is returned. This seems to be an graph forbidden error - although the perms are granted for the app. checking the app logs I can see authentication requests to the app are successful.

Get-MdmAdmxConfigurationProfile.ps1:24 Line | 24 | … $Policies = Invoke-DocGraph -Path "/deviceManagement/groupPolicyConfi … | ~~~~~~~~~~~~~ | {"error":{"code":"UnknownError","message":"{\"ErrorCode\":\"Forbidden\",\"Message\":\"{\r\n \\"_version\\": | 3,\r\n \\"Message\\": \\"An error has occurred - Operation ID (for customer support): | 00000000-0000-0000-0000-000000000000 - Activity ID: 3ea1eab9-de3f-4566-853e-e21a48f28c5e - Url: | https://fef.msub06.manage.microsoft.com/GroupPolicy/GroupPolicyAdminService/b15c97ad-ffff-2381-1005-101803302442/deviceManagement/groupPolicyConfigurations?api-version=5018-11-06\\\",\\r\\n \\"CustomApiErrorPhrase\\": \\"\\",\r\n \\"RetryAfter\\": null,\r\n \\"ErrorSourceService\\": \\"\\",\r\n \\"HttpHeaders\\": \\"{\\\\"WWW-Authenticate\\\\":\\\\"Bearer realm=\\\\\\\\"urn:intune:service,e222d5da-8504-4631-88ef-3a3318f7dc07,f0f3c450-59bf-4f0d-b1b2-0ef84ddfe3c7,3e9c57b9-808d-4aa0-9500-4b2d369279e7\\\\\\\\"\\\\"}\\"\r\n}\",\"Target\":null,\"Details\":null,\"InnerError\":null,\"InstanceAnnotations\":[]}","innerError":{"date":"2023-10-18T12:25:09","request-id":"3ea1eab9-de3f-4566-853e-e21a48f28c5e","client-request-id":"3ea1eab9-de3f-4566-853e-e

ThomasKur commented 5 months ago

I was not able to replicate the issue. Therefore, I will close the Issue.