How to fix the issue Caused by: com.microsoft.aad.msal4j.MsalClientException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.microsoft.aad.msal4j.ManagedIdentityErrorResponse$ErrorField` (although at least o

Subrahmanyam M 0 Reputation points
2024-12-19T06:11:56.7266667+00:00

Hello Team, I am trying to deploy the pods into Kubernetes cluster on Azure cloud, my spring boot application is using version 3.4.0 along with the below azure dependencies. Kindly help.

Logs :

java.lang.IllegalStateException: Failed to configure KeyVault property source 'azure-key-vault-secret-property-source-0' at com.azure.spring.cloud.autoconfigure.implementation.keyvault.environment.KeyVaultEnvironmentPostProcessor.buildKeyVaultPropertySource(KeyVaultEnvironmentPostProcessor.java:146) at com.azure.spring.cloud.autoconfigure.implementation.keyvault.environment.KeyVaultEnvironmentPostProcessor.buildKeyVaultPropertySourceList(KeyVaultEnvironmentPostProcessor.java:130) at com.azure.spring.cloud.autoconfigure.implementation.keyvault.environment.KeyVaultEnvironmentPostProcessor.postProcessEnvironment(KeyVaultEnvironmentPostProcessor.java:93) at

Caused by: com.microsoft.aad.msal4j.MsalClientException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `com.microsoft.aad.msal4j.ManagedIdentityErrorResponse$ErrorField` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('invalid_request')

at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 10] (through reference chain: com.microsoft.aad.msal4j.ManagedIdentityErrorResponse["error"]) at com.microsoft.aad.msal4j.JsonHelper.convertJsonToObject(JsonHelper.java:35) at com.microsoft.aad.msal4j.AbstractManagedIdentitySource.getMessageFromErrorResponse(AbstractManagedIdentitySource.java:81) at com.microsoft.aad.msal4j.IMDSManagedIdentitySource.handleResponse(IMDSManagedIdentitySource.java:107) at com.microsoft.aad.msal4j.AbstractManagedIdentitySource.getManagedIdentityResponse(AbstractManagedIdentitySource.java:46) at com.microsoft.aad.msal4j.ManagedIdentityClient.getManagedIdentityResponse(ManagedIdentityClient.java:48) at com.microsoft.aad.msal4j.AcquireTokenByManagedIdentitySupplier.fetchNewAccessTokenAndSaveToCache(AcquireTokenByManagedIdentitySupplier.java:90) at com.microsoft.aad.msal4j.AcquireTokenByManagedIdentitySupplier.execute(AcquireTokenByManagedIdentitySupplier.java:70) at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:69) at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:18) ... 2 common frames omitted Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of com.microsoft.aad.msal4j.ManagedIdentityErrorResponse$ErrorField (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('invalid_request') at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION disabled); line: 1, column: 10] (through reference chain: com.microsoft.aad.msal4j.ManagedIdentityErrorResponse["error"])

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,205 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.