question

Sunny987 avatar image
0 Votes"
Sunny987 asked amanpreetsingh-msft commented

Connect Powershell to Azure AD failed

I am trying to connect Azure AD , I am running PowerShell in elevated type "connect-azuread"

Since I have different global Admin id then my login credentials on windows 10 I enter GA account.

I think this is related to user context but not sure how to fix ?

**Request Id: 0d6cd71d-b57b-4047-b957-bd7g1c5c3b00

Correlation Id: adb18825-dhb5-42ef-ba42-a0d246e3618c Timestamp: 2020-05-12T13:23:27Z

Message: AADSTS90100: ctx parameter is empty or not valid.**

azure-active-directory
· 2
5 |1600 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.

@Sunny987 The correlation ID is incorrect. Could you please check the same and provide the correct one?

0 Votes 0 ·
Sunny987 avatar image Sunny987 amanpreetsingh-msft ·

please check this one : d8446abf-041a-4643-83b2-f1ca2227fff4

0 Votes 0 ·

1 Answer

amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered amanpreetsingh-msft commented

@Sunny987 This may happen due to WIA (Windows Integrated Authentication). You can try to login to your Windows 10 machine using your GA credentials or running PowerShell with GA Credentials and run Connect-AzureAD, it should work. You can also test by breaking WIA by removing the IDP URLs (for seamless SSO) from local intranet zone, and try Connect-AzureAD. Keep in mind, if you remove IDP URLs from local Intranet zone it may break SSO experience for other applications as well. So try this for testing purpose and revert this change afterwards.


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

· 4
5 |1600 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.

Yes If i login using GA it is working and If I open PowerShell with different user GA credes working fine.

But on Windows 7 it works fine its just win10 issues where it does not understand user context.

Do you know If is there a way to enable basic auth as I am trying to exchange using GA but it is not letting me do that?
GPO is not letting us enable basic auth using winrm cmdlet, I am not sure why exchange still needs basic auth.

0 Votes 0 ·

@Sunny987 In order to for basic auth, you can store the credentials in a variable using $cred = get-credentials but if you are using MFA or Federated Authentication, this won't work.

0 Votes 0 ·
Sunny987 avatar image Sunny987 amanpreetsingh-msft ·

Thanks for the input,

not using MFA on test env, how this will help with Basic auth ?

0 Votes 0 ·
Show more comments