How to create Context For logged in user if Provider Hosted add-in using App Only Authorization Policy in SharePoint 2019

Abha Sharma 1 Reputation point
2021-10-06T12:11:00.443+00:00

Hi,

Can anyone suggest How to create Context For logged in user if Provider Hosted add-in ,using App Only Authorization Policy in SharePoint 2019.

I have following requirement:

  1. Need to fetch data from SP list for logged in User but Provider Hosted Add-in using 'App Only' policy

Thanks.

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,668 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-10-07T01:56:54.297+00:00

    Hi @Abha Sharma ,

    No, this is not avilable in add-in usinng app only policy.

    When the add-in-only policy is used, SharePoint checks only the permissions of the add-in principal. Authorization checks succeed only if the current add-in has sufficient permissions to perform the action in question, regardless of the permissions of the current user (if any).

    Please check this article for more: https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/add-in-authorization-policy-types-in-sharepoint#overview-of-add-in-authorization-policy-types


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.