The following commands is designed for Microsoft Cloud Solutions Providers (CSP) to connect to a customer tenant using powershell.

Prerequisites

To find your tenant ID, log in to Microsoft Azure as an administrator, in the Microsoft Azure portal, click Azure Active Directory. Under Manage, click Properties. The tenant ID is shown in the Directory ID box.

To find your subscription ID, log on to the Azure portal, in the left navigation panel, click Subscriptions. The list of your subscriptions is displayed along with the subscription ID

Commands

 Run powershell as administrator

Install-Module AzureRM

$credentials = Get-Credential

When prompted, enter credentials of partner account

 

Login-AzureRmAccount -Credential $credentials -Subscription <Subscription ID> -TenantId <Tenant ID>

You should now be able to run azure powershell commands from within the customer tenant environment