Azure Server Authentication mysteriously stops functioning since last night

Lucas Harskamp 20 Reputation points

Issue resolved: The latest KeyVault update Microsoft implemented breaks older versions of the Azure CLI. Update your Azure CLI to 2.6, that should resolve the issue. (it did for me)

Original issue:

To debug the software, I'm using an Azure KeyVault which stores all connection strings (on a resource group specified for testing, which is a replica of the resource group for production). A user access policy is created in the KeyVaultrepresenting the programmer working with the testing resource group items. This has been working as intended for a year now.

Out of the blue, since yesterday 1530 UTC, this has stopped working for me. Visual Studio threw me a Azure.Identity.CredentialUnavailableException. Naturally, I assumed I had to log in again using Tools -> Options -> Azure Service Authentication. When this didn't work, I threw out the entire cache of VS and removed all users from File -> Account Settings, restarted VS and tried it again, to no avail. As far as my debugger is concerned, I am logged in properly, yet somehow I can't retrieve any KeyVault secrets. The options set in the Azure Key Vault of course are set properly.

Screenshot 2024-04-30 104508

I did some digging, and as it turns out there was an update for the KeyVault yesterday right at that moment? Might that be the issue?

In any case, I do not know whether I made a mistake, it was caused by the update or if it's a Visual Studio mishap that I hadn't circumvented properly. So it might be an Azure bug out of my reach, or something you can hopefully provide suggestions for to resolve.

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,146 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Umar 160 Reputation points

    Subject: Re:Azure Server Authentication mysteriously stops functioning since last night

    Dear Lucas Harskamp,

    Thank you for reaching out to us with your issue regarding Azure Server Authentication. I understand that you are using an Azure KeyVault to store connection strings for your software, and that you have a user access policy created in the KeyVault representing the application.

    Based on the information provided, it seems that the authentication issue could be caused by a variety of factors, including but not limited to:

    1. Expired or revoked KeyVault access policies
    2. Changes to the application's code or configuration that affect authentication
    3. Network connectivity issues between the application and KeyVault
    4. Issues with the KeyVault service itself

    To help diagnose the issue, I would recommend taking the following steps:

    1. Verify that the KeyVault access policies are still valid and have not been revoked.
    2. Check the application's code and configuration to ensure that no changes have been made that would affect authentication.
    3. Review the application's logs and any error messages that may have been generated to help pinpoint the issue.
    4. Test the application's connectivity to the KeyVault using tools such as Telnet or Ping to ensure that there are no network issues.
    5. Check the Azure Service Health dashboard to see if there are any current issues with the KeyVault service that may be affecting your application.

    If you have already tried these steps and are still experiencing issues, please provide us with more details about the error messages you are seeing, as well as any relevant logs or screenshots that may help us diagnose the issue further.

    Thank you for using Microsoft Q&A, and we look forward to helping you resolve this issue.

    Best regards,


  2. Sandeep G-MSFT 15,236 Reputation points Microsoft Employee

    @Lucas Harskamp

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "[The question author cannot accept their own answer. They can only accept answers by others] (**)", I'll repost your solution in case you'd like to "[Accept] (**)" the answer.

    Issue: Azure Server Authentication mysteriously stops functioning.

    Solution: The latest KeyVault update Microsoft implemented breaks older versions of the Azure CLI. Update your Azure CLI to 2.6, this resolved the issue for you.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments