Is there a way to get license assigned date to user from GRAPH REST API

Hritik Raushan 20 Reputation points
2025-01-31T21:21:11.6033333+00:00

I am writing a powershell script to fetch the details of user who has been assigned a particular license.

Eg I want to fetch the details of all user who has been assigned POWER BI PRO license and the date on which license is assigned.

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,623 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,088 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,928 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,836 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,072 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 112.7K Reputation points MVP
    2025-02-01T14:13:40.8333333+00:00

    You cannot get the license assignment data directly, as there is no property that reflects that. You can take a look at the licenseAssignmentStates property, which does include the lastUpdatedDateTime, but that's on the individual service level, not the license as a whole. If you want the actual license assignment data, you will need to query the Entra audit log or the Unified Audit log for the corresponding licensing operations.

    If you want more details on this, I'd recommend going over Tony's post here: https://practical365.com/azure-ad-license-assignment-dates/

    He also provides a script sample to fetch the license assignment date via the audit log, you can find it here: https://office365itpros.com/2022/10/14/azure-ad-license-assignment-report/

    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.