[QUERY] Is managed Identity Authentication possible for ai formrecognizer/document intelligence service? UnknownHostException #43372
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-triage
Workflow: This is a new issue that needs to be triaged to the appropriate team.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Query/Question:
Is managed Identity Authentication possible for ai formrecognizer/document intelligence service? As per Azure AI Services docs, all managed identity authentication is possible for ai services.
Error: java.net.UnknownHostException : {resource-name}.cognitiveservies.azure.com.
Code: Referred from following azure sample doc: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/Authentication.java
Logs(notable ones):
Code: (From azure samples)
Why is this not a Bug or a feature Request?
This possibly, doesn't look like a bug as far as obtaining token is concerned as, token being obtained confirmation is seen in logs.
When using new AzureKeyCredential("key) in place of new DefaultAzureCredentialBuilder() .managedIdentityClientId("client-id").build() for obtaining token, everything works as expected.
logs:
Setup (please complete the following information if applicable):
OS: Linux Redhat ubi9 (from base dockerimage ubi9/ubi:latest) and Windows 11 Desktop
Environment: Running on Azure Container Apps , (vscode when in development env)
Library/Libraries: com.azure:azure-ai-formrecognizer:4.0.0, com.azure:azure-identity:1.13.2, com.azure:azure-sdk-bom:1.2.27
Azure Setup: Using user managed Identity assigned to azure container app with "Cognitive User Role" on Azure Document Intelligence resource. All connections are being made in private network. The same container using the same user-managed-id is able to pull secrets from keyvault and connect successfully with cosmosdb.
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
The text was updated successfully, but these errors were encountered: