Read Intune apps from Microsoft Graph

Copper Contributor



From a SharePoint WebPart I'm trying to fetch the Intune Apps for the logged in user. However when I call the endpoint (/v1.0/deviceAppManagement/mobileApps) I get a 401 response.

"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: 72746d36-8b0a-4751-9523-755b70b0b5cf - Url:\\\",\\r\\n \\\"CustomApiErrorPhrase\\\": \\\"\\\",\\r\\n \\\"RetryAfter\\\": null,\\r\\n \\\"ErrorSourceService\\\": \\\"\\\",\\r\\n \\\"HttpHeaders\\\": \\\"{\\\\\\\"WWW-Authenticate\\\\\\\":\\\\\\\"Bearer realm=\\\\\\\\\\\\\\\"urn:intune:service,9225b241-44e1-44a8-8bfe-c10e39177505,f0f3c450-59bf-4f0d-b1b2-0ef84ddfe3c7\\\\\\\\\\\\\\\"\\\\\\\"}\\\"\\r\\n}\",\"Target\":null,\"Details\":null,\"InnerError\":null,\"InstanceAnnotations\":[]}",
"innerError": {
"request-id": "72746d36-8b0a-4751-9523-755b70b0b5cf",
"date": "2019-05-27T14:12:39"

The Azure AD app has been assigned the delegated 'DeviceManagementApps.Read.All' permission.

I can retrieve information about the current user (/me).


Could it be that the Intune license is not correctly applied in our tenant? How do I check this?


Thanks in advance for any pointers.


2 Replies

To check license assignment you can use "Troubleshooting" panel in Intune console, just select user and it should show you if there is any issue with license.


If you can get info using your account through the same web-part, that more like permission issue rather than license issue.

I can only recommend you to check this article, maybe consent is missing.

@Alexander Vanyurikhin Thanks for the pointer. I cannot access the Intune configuration myself so I will ask someone to check that for me.


As for the permissions for Microsoft Graph 'User.Read' and 'DeviceManagementApps.Read.All' where consented to by an admin. So that should work...