Office 365 TIP – Extract Direct vs Inherited License

You have already seen in my earlier blog post on how to use Azure AD group based licensing to do license assignments of different office 365 products.

After implementation completion, we landed up in a situation where Visio/Project team wanted to know the user ids that have been provided direct license and are not getting license from group.

As group based licensing is being used so Assignment Paths in Azure AD portal will show as inherited or Direct.

Unfortunately you can not extract the list from the GUI portal, there is no option present as of now to export in excel, csv or other formats.

Only option we have is to get it from powershell, there as well there is no direct property so a small script will be required, before doing that install MSOL module.

follow: https://syscloudpro.com/2015/04/30/connecting-office-365-via-powershell/

Get the group objectID that you have used in assignment.(from azure AD search for the group)

Lets now use the bellow script as an example to extract the required info.

Use Get-MsolAccountSku to get different SKUID Name (below is example for Visio)

##################################################

$collection = @()

$collect =Get-MsolUser -all | where{($_.islicensed -eq $true) -and ($_.licenses.Accountskuid -like “*Visioclient*”)}  # change accordingly

$collect | Foreach-object{

$mcoll = “” | Select userPrincipalName, GroupID

$mcoll.userPrincipalName = $_.userprincipalname

$_.licenses | foreach-object {

if($_.AccountSkuId -like “*visio*”){

$mcoll.GroupID = $_.GroupsAssigningLicense.Guid }

}

$mcoll

$collection+=$mcoll

}

$collection | export-csv c:\visiolicense.csv -notypeinfo

#################################################

 

After running this script you will get a report as below in csv format and you can filter the Direct vs non Direct assignments as you already know the group objectid you used for license implementation.(group objectid extracted above)

You can also use this small script to get details if you have used different groups for assignments.

Thanks for reading

Sukhija Vikas

http://SysCloudPro.com

 

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s