How to retrieve SharePoint Document details for a particular record in MS CRM using FetchXML from Azure API?

Q.Aimad 1 Reputation point
2022-09-15T01:09:46.867+00:00

We have a case where we need to retrieve sharePoint Document details for particular record in Microsoft CRM, we need exactly two information from the record which are the filename and regardingobjectid (to whom this document belongs to).

I found this post: https://mscrm16tech.com/2020/09/09/get-sharepoint-document-details-for-particular-record-in-ms-crm-using-fetchxml/ I followed the same approch and i used the fetchXML in c# console program it worked as expected but the probleme when I created an API in azure APIM which will communicate with dynamics to get the results of the fetchXML.

Here is the policy that I have created:

241129-screenshot-7.png

When I test the API I get this error message (statuscode 500)

241186-screenshot-8.png

NOTE: I checked the URL in the browser (with the same fetchXML) and it worked without a problem also the authorization token was added successfully! also I get the same problem when I tested it in Postman.

What is the problem? I really don't know what to do here, any help will be appreciated.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,084 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.