Azure ID - Incorrectly identifies as two accounts (work/school and personal)

dude95 20 Reputation points
2024-10-29T11:01:56.8433333+00:00

My user ID that was setup in azure as part of the startup hub incorrectly identifies as both a work/school account and also a personal account. This has lead to a roadblock in putting together my deployment scripts as it's having issues programmatically determining my object ID for my user. When logging in - I normally have to select which account to use via a browser. Through scripting, it just errors out altogether.

Found multiple accounts with the same username 'timxxx@xxx.com': [{'home_account_id': '747e0494-612a-49d2-a9f0-ac512e4340ae.f20f5397-6421-44f6-80aa-1dbcc827e24d', 'environment': 'login.microsoftonline.com', 'username': 'timxxx@xxx.com', 'account_source': 'urn:ietf:params:oauth:grant-type:device_code', 'authority_type': 'MSSTS', 'local_account_id': '747e0494-612a-49d2-a9f0-ac512e4340ae',

'realm': 'organizations'}, {'home_account_id': '00000000-0000-0000-edbe-a05df11c0122.9188040d-6c67-4c5b-b112-36a304b66dad', 'environment': 'login.microsoftonline.com', 'username': 'timxxx@xxx.com', 'account_source': 'broker', 'authority_type': 'MSSTS', 'local_account_id': '00000000-0000-0000-edbe-a05df11c0122.9188040d-6c67-4c5b-b112-36a304b66dad.f8cdef31-a31e-4b4a-93e4-5f571e91255a', 'realm': 'organizations'}]

Please report to us via Github: https://github.com/Azure/azure-cli/issues/20168

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
709 questions
Azure Startups
Azure Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Startups: Companies that are in their initial stages of business and typically developing a business model and seeking financing.
409 questions
0 comments No comments
{count} votes

Accepted answer
  1. Raja Pothuraju 8,265 Reputation points Microsoft Vendor
    2024-10-30T15:00:23.7166667+00:00

    Hello @dude95,

    Thank you for posting your query on Microsoft Q&A.

    I hope this information is helpful. Please feel free to reach out if you have any further questions.

    Based on the description above, I understand that your account is linked to both a work or school account and a personal account. When logging in via a browser, you have the option to select either the work or school account or the personal account, allowing you to access the Azure Portal without issues. However, when using this account to run scripts non-interactively, the login attempt fails. This likely occurs because your account is linked to a personal account.

    To resolve this issue, I recommend checking the email aliases associated with your personal account and removing any work or school email addresses.

    To do this, sign in to account.live.com, go to Your Info > Account Info > Edit Account Info, and review the email aliases listed. If you see any work or school email addresses, remove them and set a primary alias that uses a personal account domain (such as @hotmail.com, @live.com, @outlook.com, or @msn.com).

    If you don’t find any additional aliases linked to your personal account, check your work or school account email address for any linked aliases as well.

    Add or remove an email alias in Outlook.com

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Thanks,
    Raja Pothuraju.


0 additional answers

Sort by: Most helpful

Your answer

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