Working on User Profile Services in SharePoint Hosted App Permissions
SharePoint 2013 ‘SharePoint Hosted’ App Permissions
Reference
SharePoint 2013 ‘SharePoint Hosted’ App Permissions
It
turns out this SharePoint 2013 dev malarkey is actually
pretty good! I’m working on a SharePoint hosted app at the moment which
queries the User Profile Service using SP.UserProfiles.js. It’s nice to
see that we have a decent javascript API to use now when querying user
profiles.
Anyhow my code was failing when trying to retrieve a User
Profile Property with the following exception –
Access denied. You do not have permission to perform this action
or access this resource.
It turns out the AppManifest.xml is
the
key, in here you can set Permission requests that your App will be able
to perform e.g. read from the current web, write to the Taxonomy
service etc. In my case I hadn’t set the read permission for the User
Profile service.
Once I had set this up. hey presto it worked!!
Reference
http://www.sharepointalex.co.uk/index.php/2012/11/sharepoint-2013-sharepoint-hosted-app-permissions/
No comments:
Post a Comment