Connect-AzureAd is not connecting to -TenantID specified

Manohar Velliangiri 0 Reputation points
2023-05-29T05:44:32.62+00:00

Hello there

I'm connecting to azure desired tenant

connect-azuread -tenantId mydesiredtenant

using azure powershell cli. It successfully connects and no error. But when i do run

azure-getadapplication 

it lists the applications related to home tenant not the tenant id that I had connected to. So please advise what I'm doing wrong?

PS: I can't even find a command to see which tenant id I'm really connected to.

Cheers

Mano

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,306 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. K Sheahan Kularathne 431 Reputation points
    2023-05-29T13:30:22.2466667+00:00

    Try this command "Get-AzureADApplication"

    Please refer to this link for more information https://learn.microsoft.com/en-us/powershell/module/azuread/get-azureadapplication?view=azureadps-2.0

    Please Mark as Answered If my answer helps you to solve your problem.