Skip to main content

Notifications

Announcements

No record found.

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.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,904 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,605 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans