Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Upload Sharepoint Document using Dynamics 365 Web API

(0) ShareShare
ReportReport
Posted on by

I have a custom entity and integrated it with Sharepoint. I will be creating these records using web API. How can I add documents to SharePoint via API?

  • Victor Onyebuchi Profile Picture
    404 on at
    RE: Upload Sharepoint Document using Dynamics 365 Web API

    Hi Arif,

    I am actually in need of a solution like this.

    Do you mind sharing the web API calls made? I wanna see the conversion of docs in your code and all?

    Thanks

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Upload Sharepoint Document using Dynamics 365 Web API

    SOLVED!

    Thank you for all your messages.

    I solved my own question. Let's explain how I did.

    I did a bit search on Dynamics API and found this entity:"sharepointdocumentlocations"

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/sharepointdocumentlocation?view=dynamics-ce-odata-9

    And I made a GET request and it returns an attribute which is called "relativeURL"

    I saw that its value is: "_relatedRecordGuid". It always starts with underscore.

    And also I found that all files uploaded from Dynamics UI to sharepoint is under that folder.(If Dynamics record is different, than new folder created with "_newRecordGuid" and files uploaded under this folder.)

    I thought that I can create a new folder under my entity folder in SharePoint using SharePoint API. And I did.

    For example if the records guid is like below;

    createdRecordGuid="123asd123qwexxcv123..."

    I created folder which is called "_createdRecordGuid" under "entityname folder"(In my situation, it was "rd_jobapplication")

    so created Folders path is like: ("rd_jobapplication/_" + createdRecordGuid.upper()) //Folder names are UPPERCASE

    And I uploaded the file under this path.

    It solved my problem. Now I can see uploaded files using API, under the related record.

    Thanks.

  • Anrini Profile Picture
    on at
    RE: Upload Sharepoint Document using Dynamics 365 Web API

    I hope these will be useful

    blog.crgroup.com/.../

    docs.microsoft.com/.../sharepointdocumentlocation

  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,017 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans