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/