none
Connect-MSOLService to different Tenant

    Question

  • I know this is dumb, but I can't find the answer anywhere. 


    I Connect-MSOLService, provide creds, all good. It defaults me to my main Tenant. 

    Is there a way, to connect directly to another Tenant? One that Own. If I do a Connect-AzureAD, I can do -TenantID. Here though, that doesn't seem to be possible. If I do Get-MSOLUser -TenantID <Tenant-id>, I am getting access denied. 

    I don't think this should be so hard. I can do all this from the portal, but I have reason to use powershell. 

    Thanks

    Tuesday, April 17, 2018 5:47 PM

All replies

  • You can only use Connect-MSOLService if you actually have account in the other tenant. Otherwise, connect with your own account, then use -TenantId parameter for each relevant cmdlet. Do not that it only accepts tenants which you have added in your partner portal. If you are not a partner, this will not work.
    Tuesday, April 17, 2018 6:22 PM
  • Not all the cmdlets have the -TenantId parameter.  I'm trying to access Get-MsolDevice to figure out which devices have O365 MDM but no luck.
    Monday, October 29, 2018 6:52 PM