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.