Office 365 Reporting via PowerShell for Syndication Partners
Audience
Office 365 Syndication Partners
Description
This article intends to provide Office 365 Syndication Partners with a guide on how to use PowerShell for their bulk reporting needs. The article has samplescenarios where a reporting need arises, sample scripts and sample output.
Background
Today, Office 365 Syndication Partners do not have the ability to report customer related information in bulk through the Office 365 Administration Portal. If such need arises, the partner can use their MOSI implementation to report; or if MOSI has not been implemented yet, the partner must use PowerShell to accomplish this task. When using PowerShell to report customer information in bulk, the Syndication Partner must overcome some challenges:
- There is littledocumentation available to Syndication Partners on how to use the Get-MsolPartnerContract cmdlet (exclusive for partner use) in combination with the other cmdlets to ultimately obtain data for multiple customers at once.
- The partner must be familiar with the available outputs of each cmdlet and know how to relate the output of each cmdlet when possible, as well as know how such output matches the information displayed in MOP
- The partner may only have one parameter as input that may not necessarily be the one that the cmdlet acceptsin order to provide the desired output
What's in Scope
- Sample code and sample output for Office 365 Reporting for Syndication Partners using Windows Azure Active Directory Module for Windows PowerShell cmdlets (previously known as the Microsoft Online Services Module for Windows PowerShell cmdlets).
What's Out of Scope:
- Administration of Office 365 using Windows Azure Active Directory Module for Windows PowerShell cmdlets (previously known as the Microsoft Online Services Module for Windows PowerShell cmdlets).
- Administration or reporting of any of the Office 365services using theirPowerShell modules (Exchange Online and SharePoint Online)
Assumptions:
- The reader has installed the Windows Azure Active Directory Module for Windows PowerShell (learn how)
- The reader has administrator credentials within a Syndication Partner tenant and has connected to the service using the Connect-MsolService cmdlet
Limitations:
- Sample scripts provided in this article are not optimized for best performance. It is up to the partner to enhance the scripts for best performance.
- Sample scripts provided in this article do nothave error handling. It is up to the partner to enhance the scripts to handle errors.
- Sample scripts provided in this article do not validateinput data provided by user. It is up to the partner to enhance the scripts to validate input data.
- Sample scripts provided in this articleprovide aCSV files as output. It is up to the partner to enhance the scripts if a different output file type is required.
- It may take several hourstorun bulk reports via PowerShelldepending on the number of customersreported and the partner's connectivityto the service
- When reporting subscriptions, deprovisioned subscriptions will not be displayed in the report. Thus, a tenant may exist in MOP without an associated subscription if this subscription is deprovisioned.
- For Syndication Partners who offer trial subscriptions,these willbe displayed without identifying which are paid and which are trial subscriptions.