Connecting to customer tenants using delegated access

If you're an IT professional providing services to Office 365 customers, connecting to Office 365 tenants for your clients can be a bit more complicated than the examples shown previously.

Most commands in the Azure AD PowerShell module will allow you to specify a -TenantId parameter. This is a GUID associated with each of your customer's tenants. But where does this value come from? You can use the Get-MsolPartnerContract to display a list of tenant IDs for the clients you have delegated access to:

Get-MsolPartnerContract -All

Unfortunately, this ID by itself is not very useful. You'll have to combine it somehow with other commands to get something you can identify as a specific client. ...

Get Mastering Office 365 Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.