-
Notifications
You must be signed in to change notification settings - Fork 1k
Error 401 when using Access Token created via High Trust Add-in #7237
Copy link
Copy link
Closed
Labels
area:add-insCategory: SharePoint Add-in Development ModelCategory: SharePoint Add-in Development Modelarea:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devtype:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active work
Metadata
Metadata
Assignees
Labels
area:add-insCategory: SharePoint Add-in Development ModelCategory: SharePoint Add-in Development Modelarea:docs-commentCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devCategory: Comment left on bottom of a docs page here: https://docs.microsoft.com/sharepoint/devtype:archive-old-issueIssues which are closed as tool old for active workIssues which are closed as tool old for active work
Type
Fields
Give feedbackNo fields configured for issues without a type.
I created a high trust add-in for SharePoint OnPrem 2016 by following these steps:
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/create-high-trust-sharepoint-add-ins
I could successfully create access token for an user. However when I try to access any REST API via Postman, I get the following error message
Request:
Response:
However, I observed that if 'Anonymous Authentication' is enabled in IIS for SharePoint web application then I am able to access the above REST API but if the 'Anonymous Authentication' is disabled in IIS then I receive 401 UNAUTHORIZED error.
Is Anonymous Authentication a prerequisite for REST APIs in SharePoint on-premise? If not, how do I access REST APIs for high-trust add-in without anonymous authentication?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.