question

JinnJin-9894 avatar image
0 Votes"
JinnJin-9894 asked SupratikChatterjee-7199 answered

Azure Powershell connect-azaccount script error

I am using local powershell to connect to azure account but it gives me script error, what should I do now?

2535-ps.png
2612-pserror.png

The script is https://logincdn.msauth.net/16.000/js/OldConvergedLogin_PCore_B3EyET68C7phuItxSpJwyg2.js

azure-ad-connect
ps.png (4.8 KiB)
pserror.png (8.4 KiB)
· 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.

@JinnJin-9894 Have you had a chance to test the solution out?

0 Votes 0 ·

No need, it was fixed itself when I connected again a day later

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

Hi @JinnJin-9894,

This script is used when the same email is registered as Personal as well as Work Account. Easier way to confirm this is by opening a browser in in-private/incognito mode and try to login to Azure Portal. You should get below prompt which is as a result of OldConvergedLogin JavaScript.

2621-capture.jpg

Now there can be multiple reasons why the script is failing and might need some deep level of troubleshooting and data gathering to understand this.

However, as a quick fix, you can follow the instructions provided here: https://support.microsoft.com/en-us/help/12407/microsoft-account-change-email-phone-number to rename your personal account (which is an irreversible change). Once the personal account is renamed, the JavaScript for OldConvergedLogin would not be required and this error will not pop-up.

For more information, please refer to: https://support.office.com/en-us/article/which-account-do-you-want-to-use-2b5bbd7a-7df6-4283-beff-8015e28eb7b9


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



capture.jpg (14.2 KiB)
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.

PatrickCai-1074 avatar image
0 Votes"
PatrickCai-1074 answered

Hi ,

I am encountering the same issue.
I can't login AZ by Connect-AzAccount, when type my account and click login, it shows below error.

8699-error.png




My account is not a work/school accout but a personal one. Can someone help to solve the issue?

Thanks in advanced.




error.png (55.2 KiB)
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.

Rahul-7230 avatar image
0 Votes"
Rahul-7230 answered

Hi,

This could be due to network issue firewall blocking.

May I know if you all are getting the same error when connecting to open network from other machine or VM.

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.

JinnJin-9894 avatar image
0 Votes"
JinnJin-9894 answered JinnJin-9894 edited

From my experience, it may be caused by network or server side issue. I reconnected in one day later, the issue was fixed by itself.

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.

SupratikChatterjee-7199 avatar image
0 Votes"
SupratikChatterjee-7199 answered

Step 1: Set-ExecutionPolicy Bypass -Scope CurrentUser -Force
Step 2: Import-Module Az
Step 3: Connect-AzAccount

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.