restauthenticationsharepointazure-active-directorysharepoint-addin

Authentication in sharepoint Addin


We´ve created a sharepoint-hosted Addin and want to authenticate to our enterprise Azure Active Directory. We tried to migrate the AADTokenProvider from the sharepoint webpart, to get our AccesToken from our AAD.

Following is the dependency which provides the AADTokenProvider - microsoft/sp-http

Unfortunately the dependencies aren´t standalone packages.

What´s the correct way to accomplish the authentication from sharepoint addin to a Azure AD?


Solution

  • SharePoint Add-in is an identity principal just like a user, and it must be authenticated and authorized to use SharePoint resources. There are three authorization systems that an add-in can use. They are not mutually exclusive.

    Three authorization systems and when to use them

    For more information about creating a SharePoint Add-in that uses the low-trust system, see Creating SharePoint Add-ins that use low-trust authorization.

    For more information about creating a SharePoint Add-in that uses the high-trust system, see Creating SharePoint Add-ins that use high-trust authorization.

    For more information about creating a SharePoint Add-in that uses the cross-domain library, see:

    1. Creating SharePoint Add-ins that use the cross-domain library
    2. Solving cross-domain problems in SharePoint Add-ins (blog post)

    Hope it helps.