question

MallikarjunaReddy-7742 avatar image
MallikarjunaReddy-7742 asked ·

How to bypass Connect-AzureAD authentication using the existing Connect-AzAccount connection in Powershell session

anon@userWanon@usereanon@user anon@useruanon@usersanon@usereanon@user anon@usertanon@userhanon@usereanon@user anon@usersanon@useraanon@usermanon@usereanon@user anon@useraanon@usercanon@usercanon@useroanon@useruanon@usernanon@usertanon@user anon@usertanon@useroanon@user anon@usercanon@useroanon@usernanon@usernanon@usereanon@usercanon@usertanon@user anon@userbanon@useroanon@usertanon@userhanon@user anon@usertanon@userhanon@usereanon@user anon@userAanon@userzanon@useruanon@userranon@usereanon@user anon@userpanon@useroanon@userranon@usertanon@useraanon@userlanon@user anon@user&anon@useraanon@usermanon@userpanon@user;anon@user anon@userAanon@userzanon@useruanon@userranon@usereanon@user anon@userAanon@userDanon@user.anon@user
anon@user
anon@userBanon@useruanon@usertanon@user anon@userianon@usernanon@user anon@userPanon@useroanon@userwanon@usereanon@userranon@usersanon@userhanon@usereanon@userlanon@userlanon@user,anon@user anon@userwanon@usereanon@user anon@userhanon@useraanon@uservanon@usereanon@user anon@usertanon@useroanon@user anon@useruanon@usersanon@usereanon@user anon@usertanon@userhanon@usereanon@user anon@usersanon@useraanon@usermanon@usereanon@user anon@usertanon@userwanon@userianon@usercanon@usereanon@user anon@userfanon@useroanon@userranon@user anon@user*anon@user*anon@userCanon@useroanon@usernanon@usernanon@usereanon@usercanon@usertanon@user-anon@userAanon@userzanon@userAanon@usercanon@usercanon@useroanon@useruanon@usernanon@usertanon@user anon@user&anon@useraanon@usermanon@userpanon@user;anon@user anon@userCanon@useroanon@usernanon@usernanon@usereanon@usercanon@usertanon@user-anon@userAanon@userzanon@useruanon@userranon@usereanon@userAanon@userDanon@user.anon@user*anon@user*anon@user
anon@user
anon@userIanon@usersanon@user anon@usertanon@userhanon@usereanon@userranon@usereanon@user anon@useraanon@usernanon@useryanon@user anon@userwanon@useraanon@useryanon@user anon@usertanon@useroanon@user anon@userbanon@useryanon@userpanon@useraanon@usersanon@usersanon@user anon@userCanon@useroanon@usernanon@usernanon@usereanon@usercanon@usertanon@user-anon@userAanon@userzanon@useruanon@userranon@usereanon@userAanon@userDanon@user anon@userianon@usernanon@user anon@usertanon@userhanon@usereanon@user anon@usereanon@userxanon@userianon@usersanon@usertanon@userianon@usernanon@userganon@user anon@userCanon@useroanon@usernanon@usernanon@usereanon@usercanon@usertanon@user-anon@userAanon@userzanon@userAanon@usercanon@usercanon@useroanon@useruanon@usernanon@usertanon@user anon@userPanon@useroanon@userwanon@usereanon@userranon@usersanon@userhanon@usereanon@userlanon@userlanon@user anon@usersanon@usereanon@usersanon@usersanon@userianon@useroanon@usernanon@user?anon@user
anon@user

azure-active-directoryazure-ad-connect
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

amanpreetsingh-msft avatar image
amanpreetsingh-msft answered ·

@MallikarjunaReddy-7742 The access token that you get after Connect-AzAccount contains audience: "https://management.core.windows.net/"; and the access token that you get after Connect-AzureAD contains audience: "https://graph.windows.net". A token can only be consumed by its respective audience. So you cannot bypass Connect-AzureAD in the existing Connect-AzAccount Powershell session as the token issued after Connect-AzAccount cannot be used to get another token for AzureAD.


Please "Accept as answer" wherever the information provided helps you to help others in the community.

Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.