azure-sdk-for-java: [BUG] regression in sdk 5.18.0 wrt managed id

Describe the bug

Env-vars from Iac looks like:

  AZURE_TENANT_ID                                               = data.azurerm_client_config.current.tenant_id
    AZURE_CLIENT_ID                                               = data.azurerm_user_assigned_identity.app.client_id
    SPRING_CLOUD_AZURE_CREDENTIAL_MANAGEDIDENTITYCLIENTID         = data.azurerm_user_assigned_identity.app.client_id
    SPRING_CLOUD_AZURE_CREDENTIAL_MANAGEDIDENTITYENABLED          = "true"

which worked fine on v<5.18, now breaks with: 2024-11-16T18:02:49.589413643Z Caused by: com.microsoft.aad.msal4j.MsalServiceException: [Managed Identity] Error Message: Unable to load the proper Managed Identity. Managed Identity Correlation xxx

Exception or Stack Trace 2024-11-16T18:02:49.589413643Z Caused by: com.microsoft.aad.msal4j.MsalServiceException: [Managed Identity] Error Message: Unable to load the proper Managed Identity. Managed Identity Correlation xxx

To Reproduce See description and upgrade to 5.18

Code Snippet Add the code snippet that causes the issue.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [e.g. iOS] N/A
  • IDE: [e.g. IntelliJ] N/A
  • Library/Libraries: [e.g. com.azure:azure-core:1.16.0 (groupId:artifactId:version)] starter keyvault property placeholder
  • Java version: [e.g. 8] 21
  • App Server/Environment: [e.g. Tomcat, WildFly, Azure Function, Apache Spark, Databricks, IDE plugin or anything special] appsvc/boot
  • Frameworks: [e.g. Spring Boot, Micronaut, Quarkus, etc] boot v.latest GA

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn’t provide solution for the problem, please provide:

  • verbose dependency tree (mvn dependency:tree -Dverbose)
  • exception message, full stack trace, and any available logs

Additional context Add any other context about the problem here.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (11 by maintainers)

Most upvoted comments

@davidkarlsen could you try with the latest version 5.19.0 to see whether the issue still exist?