Azure Powershell connect-azaccount script error

جن Jinn Jin 1 Reputation point
2020-01-30T04:35:15.18+00:00

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

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

5 answers

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,951 Reputation points Moderator
    2020-01-30T06:01:45.063+00:00

    Hi @جن Jinn Jin ,

    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.

    0 comments No comments

  2. Patrick Cai 1 Reputation point
    2020-05-28T09:35:21.993+00:00

    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.

    0 comments No comments

  3. Rahul 251 Reputation points
    2020-05-28T10:50:09.397+00:00

    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.

    0 comments No comments

  4. جن Jinn Jin 1 Reputation point
    2020-05-28T21:26:45.36+00:00

    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.

    0 comments No comments

  5. Supratik Chatterjee 1 Reputation point
    2020-10-19T18:51:55.443+00:00

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

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.