web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

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

(1) ShareShare
ReportReport
Posted on by 5

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:

    
        
        
        
    
    
        
    
    
        
    
    
        
    

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

{
    "error": {
        "code": "0x80060761",
        "message": "Failed to connect to SharePointSite.",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionSourceKey": "Plugin/Microsoft.Crm.ObjectModel.SharePointDocumentService",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepKey": "310eac79-cd86-4cbb-a17b-b71c2c7fa136",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiDepthKey": "1",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiActivityIdKey": "107d7d21-d48c-450b-ad87-88ccb7cc890b",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiPluginSolutionNameKey": "System",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepSolutionNameKey": "System",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionCategory": "SystemFailure",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMessageName": "SPConnectionFailure",
        "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode": "500",
        "@Microsoft.PowerApps.CDS.HelpLink": "http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException:80060761&client=platform",
        "@Microsoft.PowerApps.CDS.InnerError.Message": "Failed to connect to SharePointSite."
    }
}

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.

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 131 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 95

#3
Hamza H Profile Picture

Hamza H 30 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans