Skip to content

Azure Functions App connection to KeyVault fails with 401 response. #6

Description

@Ruchira2k

As the title suggests, once all the resources had been deployed and the user-assigned Managed ID was provided with the required roles and permissions, the Functions App fails to successfully establish connection with the key vault to get the existing secret key.

Below is the exact error displayed in output logs:

Result: Failure Exception: IOException: Server returned HTTP response code: 401 for URL: http://localhost:8081/msi/token?resource=https%3A%2F%2Fvault.azure.net&api-version=2017-09-01&client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx Stack: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at ...

Is there a known fix for this? I've been up and down SO and all related Azure documentation but didn't come across anything useful :(

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions