Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3647

Sharepoint upload file via restapi Access Denied issue

$
0
0

I am trying to upload file to sharepoint via Postman.I have following settings:

URL:

https://{tenantID}.sharepoint.com/sites/{mySite}/_api/web/GetFolderByServerRelativeUrl('/sites/{mySite}/Shared Documents')/Files/add(url='test.png',overwrite=true)

Headers:

Authorization: Bearer {accessToken}Accept: application/json;odata=verboseContent-Type: application/octet-stream

uploaded file of type .png in binary form of Postman

Response:

"error": {"code": "-2147024891, System.UnauthorizedAccessException","message": {"lang": "en-US","value": "Access denied."        }    }

Viewing all articles
Browse latest Browse all 3647

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>