I am having an issue on Sharepoint Online(Provider-hosted app) with calling User Profile REST API using AppOnlyAccessToken. My app has the feature to give permission on the fly to 'AllProfiles.Manage' scope. It managed to works with User + App token where I am getting Manager from User Profile but when I tried using AppOnlyAccessToken, it just throws me the error below:

Link to rest api call:


Additional information:

Internal Server Error - {"error":{"code":"-1, Microsoft.Office.Server.UserProfiles.UserNotFoundException","message":{"lang":"en-US","value":"User 'i:0i.t|00000003-0000-0ff1-ce00-000000000000|app@sharepoint' doesn't exist in UPA by UPN or SID, and user with this SID was not found in AD."}}}'

Anyone has any solutions to resolve this issue ?

1 Answer 1


I don't have an exact solution, but I can give some clues for which I've encountered this behavior

  1. The ClientSecret for the Add-in has expired and needs to be regenerated (default is one year valid)
  2. You need to explicitly create a user profile from your SharePoint Admin Center; as the error says
  3. You have ADFS to connect your on-prem with Online domain. This error started to occur since the moment ADFS was enabled

Can you verify / confirm the items above?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.