I have service that consumes Azure’s DocumentIntelligence service. This service has been working fine for the past few days but stopped. As far as I can tell, nothing has changed and I cannot really make up or understand the error:
com.azure.core.exception.HttpResponseException: Status code 400, "{"error":{"code":"InvalidRequest","message":"Invalid request.","innererror":{"code":"InvalidManagedIdentity","message":"The managed identity configuration is invalid: Managed identity is not enabled for the current resource."}}}"
at com.azure.core.implementation.http.rest.RestProxyBase.instantiateUnexpectedException(RestProxyBase.java:388) ~[azure-core-1.50.0.jar:1.50.0]
at com.azure.core.implementation.http.rest.SyncRestProxy.ensureExpectedStatus(SyncRestProxy.java:133) ~[azure-core-1.50.0.jar:1.50.0]
at com.azure.core.implementation.http.rest.SyncRestProxy.handleRestReturnType(SyncRestProxy.java:211) ~[azure-core-1.50.0.jar:1.50.0]
at com.azure.core.implementation.http.rest.SyncRestProxy.invoke(SyncRestProxy.java:86) ~[azure-core-1.50.0.jar:1.50.0]
at com.azure.core.implementation.http.rest.RestProxyBase.invoke(RestProxyBase.java:124) ~[azure-core-1.50.0.jar:1.50.0]
at com.azure.core.http.rest.RestProxy.invoke(RestProxy.java:95) ~[azure-core-1.50.0.jar:1.50.0]
at jdk.proxy2/jdk.proxy2.$Proxy141.analyzeDocumentSync(Unknown Source) ~[na:na]
at com.azure.ai.documentintelligence.implementation.DocumentIntelligenceClientImpl.analyzeDocumentWithResponse(DocumentIntelligenceClientImpl.java:377) ~[azure-ai-documentintelligence-1.0.0-beta.4.jar:1.0.0-beta.4]
at com.azure.ai.documentintelligence.implementation.DocumentIntelligenceClientImpl.lambda$beginAnalyzeDocumentWithModel$6(DocumentIntelligenceClientImpl.java:592) ~[azure-ai-documentintelligence-1.0.0-beta.4.jar:1.0.0-beta.4]
at com.azure.core.util.polling.SyncPoller.lambda$createPoller$0(SyncPoller.java:227) ~[azure-core-1.50.0.jar:1.50.0]
at com.azure.core.util.polling.SimpleSyncPoller.<init>(SimpleSyncPoller.java:92) ~[azure-core-1.50.0.jar:1.50.0]
at com.azure.core.util.polling.SyncPoller.createPoller(SyncPoller.java:196) ~[azure-core-1.50.0.jar:1.50.0]
at com.azure.core.util.polling.SyncPoller.createPoller(SyncPoller.java:240) ~[azure-core-1.50.0.jar:1.50.0]
Seems to be credentials related however I haven’t changed anything in this area. My setup is the following:
@Configuration
@RequiredArgsConstructor
public class AzureDocumentIntelligenceConfiguration {
private final AzureProperties properties;
/**
* Creates and returns a DocumentIntelligenceClient bean.
*
* @return the DocumentIntelligenceClient configured with the specified properties
*/
@Bean
public DocumentIntelligenceClient documentIntelligenceClient() {
return new DocumentIntelligenceClientBuilder()
.credential(new AzureKeyCredential(properties.getDocumentIntelligence().accessKey()))
.endpoint(properties.getDocumentIntelligence().endpoint())
.buildClient();
}
}
Can anyone shed some light as to why this is happening?
Explain more what the problem is
New contributor
Abdalrhman Elbadry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.