kumar
kumar

Reputation: 9387

How to connect to Azure AD tenant which does not have a subscription from PowerShell

I have an Azure AD tenant which is not associated to a subscription. When I login from the Azure portal I am able see and get to it using "switch directories".

When I log in from PowerShell, I do not see it, it only shows my subscription not by Azure AD tenant.

How do I connect to the Azure AD tenant which has no subscription?

Upvotes: 1

Views: 3590

Answers (1)

Philippe Signoret
Philippe Signoret

Reputation: 14336

Neither the Azure AD PowerShell nor the Azure PowerShell modules require that the tenant have an Azure subscription in order to connect.

If you are using the Azure AD PowerShell module, you simply connect:

Connect-AzureAD

If you are using a user account which is a member of multiple tenants, it's best to be explicit about which tenant you'd like to connect to:

Connect-AzureAD -TenantId "{other-tenant-id}"

For registering and managing apps in Azure AD I recommend using the Azure AD PowerShell module. However, if you need/want to use the Azure PowerShell module instead, the process is very similar:

Connect-AzAccount

And, if you need to be explicit:

Connect-AzAccount -TenantId "{other-tenant-id}"

Upvotes: 4

Related Questions