Forum Discussion
coxygt
Apr 12, 2022Brass Contributor
Group Based Licensing in 365
So I have recently been setting up GBL on my tenant, I am trying to run a script so I can check all licenses applied to a SKU, I need to see the UPN, Sku (Product Name), If the license is directly as...
farismalaeb
Steel Contributor
I advise you to recopy the code from the source. You missed adding the function, but I search it and get it.
PowerShell and Graph examples for group-based licensing in Azure AD
The code works fine for me.
Try to call the function alone and pass the user ID and the SKU and see the return will work or not.
UserHasLicenseAssignedDirectly -user "Email address removed" -skuId 'Orgname:SPE_E5'
Also it can be due to an incorrect modification in the select statement, which cause the result to be blank
rah1m
Sep 01, 2023Copper Contributor
I had the same issue coping the code adds addtional symbols ' - remove them then scipt works fine