Forum Discussion
Data type for "ObjectId" from Get-AzureADUserLicenseDetail
VasilMichev Thanks for the response. I do get / am after the SkuId/SkuPartNumber's and have a hashtable to show the product friendly names, etc. But what I can't get so far with AzureAD module is the assignment path. If you look in the Azure AD Portal under Licenses > All products >
Office 365 E3 (as an example) > Licensed users, the Assignment Paths column is the info I'm after.
With MSOnline, it's possible, and I'm consuming it successfully now. Direct-assigned and group-assigned licenses are identified separately in the MsolUser objects' properties. But so far I haven't found the same info available in AzureADuser nor AzureADUserLicenseDetail objects.
So I've just been inspecting the AzureAD objects and all their available properties. When I came across the unfamiliar ObjectId format but could see it is consistent, I was thinking maybe it could translate to say a combo of the SkuId, and the group's, and user's ObjectId's, converted to a specific format similar to how ImmutableId is a base64 string derived from or calculated from ObjectGuid.
Looping back to the MSOnline module, I am currently able to get everything I need from it, to confirm. I like to use AzureAD module for other tasks, over MSOnline however, so am just kind of checking around to see if I can pull the same info using only the newer module. No real urgency of any kind as long as MSOnline stays living and available in its current form.
https://docs.microsoft.com/en-us/graph/api/resources/licensedetails?view=graph-rest-1.0
So I might just be premature in trying to switch away from MSOnline. I will revisit in a few months. I'd have asked via a GitHub issue, but the AzureAD module's documentation on docs is not open for issue raising/contribution like most of the rest of the stuff on docs. Maybe this is to mute all the confused customers' concerns... Just kidding but anyway.
- VasilMichevDec 22, 2019MVP
Well I cannot speak on behalf of Microsoft here, but they do have some plans on retiring the MSOnline module/bringing all missing functionality to the AAD one. When this will happen I'm not sure, it's long overdue if you ask me.