I am building a Provider Hosted App for SharePoint 2013 in PHP. I have been successfully able to generate an access token for my user, and remotely access an api for showing all the lists. (_api/web/lists).
However, I seem to be unable to access: https://mysharepointsite.com/_api/SP.UserProfiles.PeopleManager/GetMyProperties
I get the message: Access denied. You do not have permission to perform this action or access this resource.
I am sending in the following HTTP headers which work for showing the lists, just not the user profile:
$http_headers = array( 'Authorization: Bearer ' . $access_token, 'Accept: application/json;odata=verbose' );
The app permissions I am asking for are:
- News Feed (Social) : write
- User Profiles (Social) : read
- Tenant : Read
- Core (Social) : Read
Any help would be greatly appreciated!