Hi all,
I trying to upload a file to Sharepoint using plugin, but I am not able to achieve it. I am getting 403 Forbidden error. I have gone through many blogs related to it, but I am not getting how to use those codes as many of them are not supporting. I saw few similar posts here as well, but I am not getting the solution.
I referred the below blog and successfully getting the Access Token: https://ajitpatra.com/2020/01/06/d365-call-sharepoint-api-from-plugin-custom-workflow-c-part-1/
But I didn't get any proper reference code for uploading the file. I have written below code, which is throwing {403 Forbidden} error.
URL = /http://DOMAINNAME.sharepoint.com/sites/MyPowerPlatformLearnings/_api/web/GetFolderByServerRelativeUrl('SharedDocuments/Datavesrse')/Files/add(url='a.txt',overwrite=true)/;
Thank you.