Forum Discussion

kiranraj7's avatar
kiranraj7
Copper Contributor
Apr 06, 2020

Sharepoint upload document using REST API with Jquery.

Hello experts, 

 

I have used below link code for uploading documents on sharepoint,

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/upload-a-file-by-using-the-rest-api-and-jquery#running-the-code-examples  

but I am getting error when I upload any document,

 

{"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}

 

please help me out of this issue.

 

Thanks in advance

4 Replies

    • kiranraj7's avatar
      kiranraj7
      Copper Contributor

      Sudharsan K I have create HTML web resource on CRM form and I have added <input type="file"> and on click of button I am calling function from code. But getting error.

      • Sudharsan K's avatar
        Sudharsan K
        Steel Contributor
        Hi,
        The example shown in the below link explains the use of SharePoint server and SharePoint online and then to communicate using REST API. From CRM I need to check how to access the SharePoint repositories. May I know which CRM version you are using, is it On-Prem or Online?

Resources