I want to get sharepoint project information using rest API's with the access token generated from a registered app.
However we are running into below error when getting the projects in postman with below URL. (Which works in browser(after login) when accessed via cookie access)
Url - https://xxxxxx.sharepoint.com/sites/pwa/_api/ProjectData/[en-us]/Projects?format=json
Headers - Authorization - Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Accept - application/json;odata=verbose
Response -
{
"error": {
"code": "-1, System.InvalidOperationException",
"message": {
"lang": "en-US",
"value": "User:<customercontent></customercontent> not found in Active directory or in project db."
}
}
}
Any help to get past this error would be greatly appriciated.