Hi @Mike London UK !
I'm not aware of any PowerShell commands to retrieve that information (though if anyone else does, feel free to chime in), however, I wanted to ask you what is the end goal with O365 the licensed users list? Maybe there is another way to achieve the same or similar.
Since this information is already provided by the CommCell License Summary Report, you could filter by the “usage based license” you are interested on and select the output as comma delimited .csv (Text) to then process it as desired.
https://documentation.commvault.com/commvault/v11_sp20/article?p=59575.htm
https://documentation.commvault.com/commvault/v11_sp20/article?p=58179.htm
Another way I can think of is using REST API call to get the Web License Summary Report (Users) Data Set (This operation returns a data set from a report)
https://documentation.commvault.com/commvault/v11_sp20/article?p=115048_1.htm
https://documentation.commvault.com/commvault/v11_sp20/article?p=115149_1.htm
https://documentation.commvault.com/commvault/v11_sp20/article?p=115046_1.htm
Hope it helps!
Best regards,
Sarahy Pardo
US-Server
Thanks Sarahy, we haven’t added the customer into our system yet. We are in the discovery phase and one of the conversations was around the number of users sold to them (low hundreds) and their actual user count (low thousands). Exchange and OneDrive users can be configured by AD group membership and the license summary report will report accurately against the group(s). However, the main factor is the number of users licensed for SharePoint as the report will take those and the Exchange, OneDrive users and count unique users to give a license number.
I’m wanting to pre-empt any large discrepancy whilst I wait for some other information on their implementation to come though.
Here is the command which will list SharePoint enabled users in the tenant. During backup we count the same users.
Get-MsolUser -All | where {($_.isLicensed -eq "True")} | where {$_.Licenses.ServiceStatus | where {($_.ServicePlan.ServiceType -eq "SharePoint") -and ($_.Provisioningstatus -eq "Success")}}| Format-List | Out-File c:\Office365licensedusers.csv
https://documentation.commvault.com/commvault/v11_sp20/others/pdf/commvault-complete-license-guide.pdf
Considerations for SharePoint (online or on-premise) When SharePoint backups (covered under the Mail/Cloud App licensing) are undertaken, all users in an organization that are licensed for read/write access to the SharePoint environment must be licensed for backup. External and nonauthenticated users do not need to be counted in the overall total.
Thanks @Sridhar that is useful. I’ve amended the command to the below for a true CSV output with a limited number of fields (obtainable from the file create by the command supplied).
Get-MsolUser -All | where {($_.isLicensed -eq "True")} | where {$_.Licenses.ServiceStatus | where {($_.ServicePlan.ServiceType -eq "SharePoint") -and ($_.Provisioningstatus -eq "Success")}}| select UserPrincipalName,signinname,displayname,islicensed,licenses | Export-Csv -NoTypeInformation -Path .\Office365-SharePointLicensedusers.csv
Many thanks for your help