User account '******@myorg.com' not found in MSAL cache?

red stone 1 Reputation point
2023-09-25T15:37:27+00:00

This used to work, but today I get this error when trying to open our company MS Sql server in azure data studio on mac:

User account '******@myorg.com' not found in MSAL cache, please add linked account or refresh account credentials.

How do I work around this?

I've tried killing/restarting Azure Data studio of course.

User's image

Azure Data Studio
Azure Data Studio

A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.


6 answers

Sort by: Newest
  1. MG KYAING 1 Reputation point
    2025-07-24T05:02:39.5466667+00:00

    It fixed and worked correctly after doing as following:

    • Command palette (Ctrl/Cmd + Shift + P) and run Clear Azure Account Token Cache
    • Restart Azure Data Studio
    • Login with SSO

    Was this answer helpful?

    0 comments No comments

  2. Erin Stellato 746 Reputation points Microsoft Employee
    2023-11-05T17:12:57.34+00:00

    Folks - for anyone still having this issue can you please try with the latest Insider build (https://github.com/microsoft/azuredatastudio#try-out-the-latest-insiders-build-from-main-branch) and after installing, go to the command palette (Ctrl/Cmd + Shift + P) and run Clear Azure Account Token Cache.

    If this does not address the issue, please comment on this GitHub issue: https://github.com/microsoft/azuredatastudio/issues/24104

    Was this answer helpful?

    30+ people found this answer helpful.

  3. Erin Stellato 746 Reputation points Microsoft Employee
    2023-10-13T19:59:00.2933333+00:00

    Hi all (Rick Moore and @red stone) - I've confirmed with engineering this is not entirely resolved, and what worked in one scenario may not work for everyone. We are actively investigating, you can find the open issue here: https://github.com/microsoft/azuredatastudio/issues/24104

    I would encourage you to add your details/info there if you are able, as that may provide more detail to engineering to help resolve the issue. Thank you for your patience as we work to resolve this issue.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  4. Oury Ba-MSFT 21,156 Reputation points Microsoft Employee Moderator
    2023-10-13T19:52:15.07+00:00

    @red stone

    Problem:

    This used to work, but today I get this error when trying to open our company MS Sql server in azure data studio on mac:

    User account '******@myorg.com' not found in MSAL cache, please add linked account or refresh account credentials.

    How do I work around this?

    I've tried killing/restarting Azure Data studio of course.

    Solution:

    Adding my AD user to the following roles on Azure MS SQL Server fixed the issue:

    SQL DB Contributor & SQL Server Contributor

    and add in the networking to allow my client public IP.

    Regards,

    Oury

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  5. Ho, Eddie 25 Reputation points
    2023-10-13T11:08:26.62+00:00

    I have got it working by adding my AD user to the following roles on Azure MS SQL Server:

    SQL DB Contributor & SQL Server Contributor

    and add in the networking to allow my client public IP.

    Was this answer helpful?

    3 people found this answer helpful.

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.