我有一个未与预订关联的Azure AD租户。当我从Azure门户登录时,可以使用“切换目录”查看并访问它。
当我从PowerShell登录时,看不到它,它仅显示我的订阅,而不显示Azure AD租户。
如何连接到没有订阅的Azure AD租户?
答案 0 :(得分:1)
Azure AD PowerShell和Azure PowerShell模块都不要求租户具有Azure订阅才能进行连接。
如果您使用的是Azure AD PowerShell模块,则只需连接:
Connect-AzureAD
如果您使用的用户帐户是多个租户的成员,则最好明确说明您想连接到哪个租户:
Connect-AzureAD -TenantId "{other-tenant-id}"
对于在Azure AD中注册和管理应用程序,我建议使用Azure AD PowerShell模块。但是,如果您需要/想要使用Azure PowerShell模块,则过程非常相似:
Connect-AzAccount
而且,如果您需要露骨:
Connect-AzAccount -TenantId "{other-tenant-id}"