SharePoint / SharePoint/sp-dev-docs
Graph token generated from SPFx app returns empty response from /usageRights endpoint
@Ashlesha-MSFT is already working on this.
Since Jul 25, 2025.
- Dominant language
- PowerShell
- Stars
- 1.4k
- Forks
- 1.1k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 12
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
None
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
- browser version
- SPFx version 1.21.1
- Node.js version 18.18.0
- etc
Describe the bug / error
When using a Graph token generated from an SPFx app, the beta/me/usageRights endpoint returns an empty array with a 200 OK response. When using Graph Explorer, all licenses are returned.
I understand this may not be an SPFx issue. If this is a Graph API issue, how can I get this information over to them? This is stopping us from enforcing licenses on the SPFx side and is a major blocker. Thanks!
Graph explorer response:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('05c1fcca-11a6-444d-84f0-efd435dba6b0')/usageRights",
"@odata.nextLink": "https://graph.microsoft.com/beta/users/05c1fcca-11a6-444d-84f0-efd435dba6b0/usageRights?$skiptoken=***",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET users('<guid>')/usageRights?$select=catalogId,serviceIdentifier",
"value": [
{
"id": "***",
"catalogId": "***",
"serviceIdentifier": "***",
"state": "inactive"
}
]
}
Response from SPFx app:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('05c1fcca-11a6-444d-84f0-efd435dba6b0')/usageRights",
"value": []
}
Steps to reproduce
- Log in as a user with an assigned license
- Generate a Graph token from the SPFx app with User.Read permissions
- Call https://graph.microsoft.com/beta/me/usageRights
Expected behavior
Endpoint returns a list of assigned licenses.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.