OperationalInsightsDataClient throws exception for a cross resource query (to Application Insights)

%3CLINGO-SUB%20id%3D%22lingo-sub-225813%22%20slang%3D%22en-US%22%3EOperationalInsightsDataClient%20throws%20exception%20for%20a%20cross%20resource%20query%20(to%20Application%20Insights)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-225813%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20it%20possible%20to%20use%20the%26nbsp%3BOperationalInsightsDataClient%20(see%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fdotnet%2Fapi%2Fmicrosoft.azure.operationalinsights.operationalinsightsdataclient%3Fview%3Dazure-dotnet%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fdotnet%2Fapi%2Fmicrosoft.azure.operationalinsights.operationalinsightsdataclient%3Fview%3Dazure-dotnet%3C%2FA%3E)%20for%20a%20cross%20resource%20query%20to%20Application%20Insights%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEven%20though%20the%20permissions%20have%20been%20set%20correctly%20for%20Application%20Insights%20(see%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdev.applicationinsights.io%2Fdocumentation%2FAuthorization%2FAAD-Application-Setup%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.applicationinsights.io%2Fdocumentation%2FAuthorization%2FAAD-Application-Setup%3C%2FA%3E)%20the%20query%20throws%20an%20exception%20(Bad%20Request).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20cross%20resource%20query%20for%20another%20Log%20Analytics%20workspace%20works.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20the%20cross-resource%20query%20to%20an%20Application%20Insights%20resource%20supported%20or%20should%20we%20try%20another%20approach%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Etnx%20%26amp%3B%20bye%20%2F%2Femil.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-225813%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%20Insights%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EQuery%20Language%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Is it possible to use the OperationalInsightsDataClient (see https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.operationalinsights.operationalinsightsd...) for a cross resource query to Application Insights?

 

Even though the permissions have been set correctly for Application Insights (see https://dev.applicationinsights.io/documentation/Authorization/AAD-Application-Setup) the query throws an exception (Bad Request).

 

A cross resource query for another Log Analytics workspace works.

 

Is the cross-resource query to an Application Insights resource supported or should we try another approach ?

 

tnx & bye //emil.

 

 

0 Replies