User account 'me@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 'me@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.
99 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Erin Stellato 486 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

    11 people found this answer helpful.

  2. Erin Stellato 486 Reputation points Microsoft Employee
    2023-10-02T18:50:15.21+00:00

    Hi @Red stone Can you try clearing the token cache (go to Ctrl/Cmd + Shift + P) and then entering Azure Accounts: Clear Token Cache and running the command? You'll then need to restart ADS. If this continues, can you please share OS Platform and ADS version? The latest version of ADS is 1.46.

    5 people found this answer helpful.

  3. Ho, Eddie 15 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.

    2 people found this answer helpful.

  4. Oury Ba-MSFT 16,731 Reputation points Microsoft Employee
    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 'me@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

    1 person found this answer helpful.
    0 comments No comments

  5. Erin Stellato 486 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.

    1 person found this answer helpful.
    0 comments No comments