App-Only Authentication for SharePoint Server (On-Premise )

Yichen Name 86 Reputation points
2023-01-19T14:18:14.5+00:00

I am trying to get the access token for the SharePoint on prem versions, via app-only authentication. I am following this link. I am following all the steps mentioned in the article, but still no luck.

I am unable to authenticate and getting error: Tenant can't be found.
is there any solution/documentation for the app-only authentication for on prem sharepoint server?

Please help !!

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-01-20T02:10:54.7166667+00:00

    Hi @Yichen Name

    The article you shared will only work with SharePoint Online. More setup is required to use Azure Access Control Service (ACS) in an on-premises environment. Please see Use ACS to authorize low-trust provider-hosted add-ins on an on-premises SharePoint site for more information. Also, please note that to do this setup you need to have a SharePoint Online tenant.

    Your other option is to use high-trust. For more information on the setup for high-trust, please see Create high-trust SharePoint Add-ins.

    On-premises provider-hosted trust with ACS


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.