Office365 Partner Admin Center and its PowerShell secrets
Hello Team,
Boom Boom, I am back with my 5th blog, this blog is for Microsoft Partners who uses Office365 Partner Portal to manage their clients. Trust me with Office365 Partner Portal managing client have become very simplified and we are getting lots of positive feedback for the same.
However, with my support experience most of the partner they don't know that they can manage their client using powershell as well. Below is the listed commands which you can use to manage your clients using powershell
Below powershell will help you to connect and manage Exchange Online for your client using Office365 Partner Admin Center credentials.
How to connect to Exchange Online PowerShell for your client using Office365 Partner Admin Center credentials.
***********************************************************************************************
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/PowerShell-LiveID?DelegatedOrg=<tenantname>.onmicrosoft.com -Credential $LiveCred -Authentication Basic –AllowRedirection
Import-PSSession $Session
For example:
$LiveCred = Get-Credential
(Here it would prompt for username and password user your Office365 Partner Admin Center credentials. )
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/PowerShell -LiveID?DelegatedOrg=santp365.onmicrosoft.com -Credential $LiveCred -Authentication Basic –AllowRedirection
Import-PSSession $Session
***********************************************************************************************
How to connect to Windows Azure Active Directory Module for PowerShell. Below is the commands:
Connect-MSOLservice –Credential $livecred
And below :
$MSOLTenantid = (get-msolpartnercontract -domain <name.onmicrosoft.com>).tenantid.guid
In this example I am trying to connect my test tenant i.e. santp365.onmicrosoft.com using my Office365 Partner Admin Center credentials.
Connect-MSOLservice –Credential $livecred
(Here it would prompt for username and password user your Office365 Partner Admin Center credentials. )
$MSOLTenantid = (get-msolpartnercontract -domain santp365.onmicrosoft.com).tenantid.guid
Note: This only works if your clients are part of your Office365 Partner Admin Center.
After this blog I believe most of the partner would have like to have access to Office365 Partner Admin Center. You can contact Microsoft Partner Network team to get access to Office365 Partner Admin Center.
I hope above steps will help many Partners to effectively manage their client in Office365 using powershell.
Regards,
Santp.
Comments
- Anonymous
July 21, 2015
I presume there is no way to manage multiple tenants with the 1 session? MS throttle connections, even when gracefully ending them. So if you want to mange a few tenants in quick succession you can't use powershell from my experience, which I find highly restrictive. - Anonymous
January 21, 2016
Can this work for Sharepoint as well?