Hello rahul parmar
Thank you for reaching out to Microsoft Support!!
You're encountering a 403 Forbidden error when trying to access the Microsoft Graph Beta API for deviceManagement/inventoryPolicies
, even after adding the DeviceManagementConfiguration.Read.All
permission. Additionally, the URL mentioned in the response is returning a 503 Service Unavailable error.
Possible Causes:
- Insufficient API Permissions – The required permissions might have changed. According to recent updates, Microsoft Graph Beta API for
deviceManagement
may now require eitherDeviceManagementScripts.Read.All
orDeviceManagementScripts.ReadWrite.All
permissions instead ofDeviceManagementConfiguration.Read.All
.
Admin Consent Not Granted – Even if the correct permissions are added, they must be granted admin consent in Microsoft Entra ID (formerly Azure AD).
Service Availability Issues – The 503 error suggests that the backend service might be temporarily unavailable or experiencing issues.
Solution Steps:
1. Verify API Permissions
Go to Microsoft Entra ID (Azure AD) > App registrations.
Select the application making the API call.
Navigate to API permissions and ensure that DeviceManagementScripts.Read.All or DeviceManagementScripts.ReadWrite.All are added.
Click Grant admin consent for the permissions.
2. Check Microsoft Graph API Updates
- Review the latest Microsoft Graph API documentation to confirm any changes in required permissions for
deviceManagement/inventoryPolicies
.
3. Test API Access in Graph Explorer
Open Microsoft Graph Explorer.
Sign in with an account that has the necessary permissions.
- Run the query: GET https://graph.microsoft.com/beta/deviceManagement/inventoryPolicies
- If the request fails, check the error details for missing permissions.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.