Graph Api /users/{user-id}/assignedLicenses only returns empty value

Bertrand Lin 20 Reputation points
2024-10-21T14:13:38.3366667+00:00

When querying users through Graph API for Assigned Licenses, the response value: is always empty.

I have tried both v1.0 and beta endpoints, tried multiple users which I've doublechecked on 365 admin center to have assigned licenses. I am also getting successful 200 responses as permissions of user.read.all and directory.read.all are showing up in token scope.

Current app permissions:
AuditLog.Read.All
Directory.Read.All
Group.Read.All
GroupMember.Read.All
Organization.Read.All
User.Read
User.Read.All
offline_accessUser's image

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,185 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 5,880 Reputation points Microsoft Vendor
    2024-10-22T03:03:47.3566667+00:00

    Hello Bertrand Lin,

    Thank you for reaching out to Microsoft Support!

    Use the List licenseDetails endpoint to list Licenses granted to users, see the documentation for details.

    Screenshot 2024-10-22 030219

    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.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Vasil Michev 107K Reputation points MVP
    2024-10-21T16:08:55.4733333+00:00

    Can you see any properties on the user? It does look like a token/permission issue, and the query works just fine for me (i.e. no syntax errors). Try getting the /licenseDetails response instead, does it show anything?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.