SPO User Profile: Provider Hosted App - Access Denied
hi,
i'm developing provider hosted app full control permission on site collection , write permission on user profile , app-only call enabled. when try user profile properties a user access denied exception.
the app target site in sharepoint online.
code:
peoplemanager peoplemanager = new peoplemanager(clientcontext); personproperties personproperties = peoplemanager.getpropertiesfor(user.loginname); clientcontext.load(personproperties, p => p.accountname, p => p.userprofileproperties); clientcontext.executequery();
any suggestions?
andrea.
hi andrea,
how did set token in provider hosted app?
per knowledge, cannot use app-only policy user profile apis. need use service account accessing user profiles in apps.
please check link below more reference:
https://msdn.microsoft.com/en-us/library/office/mt210897.aspx#sectionsection1
thanks,
victoriatechnet community support
please remember mark replies answers if help, , unmark answers if provide no help. if have feedback technet support, contact tnmff@microsoft.com.
SharePoint , Apps for Office and SharePoint > Developing Apps for SharePoint 2013
Comments
Post a Comment