Downloading files from Sharepoint Subscription Edition in a web app

Jose Larios 0 Reputation points
2024-08-30T22:35:24.68+00:00

My goal is to have a web app that downloads files from Sharepoint Subscription Edition using the Sharepoint REST API. I don't have access to a Sharepoint Subscription Edition site for development, however, so I was hoping to use Sharepoint Online for initial development. Does msal-browser work with Sharepoint Subscription Edition, though, and can I use tokens I get from it as bearer tokens to Sharepoint REST API calls in Sharepoint Subscription Edition, like I can with Sharepoint Online?

I have read that Sharepoint Subscription Edition can be set up to authenticate using Microsoft Entra, and so this gave me some hope that the answer is "yes". However, in reading the Sharepoint Server docs I have not come across app registration instructions like those for Sharepoint Online where I register an app, set a redirectUri and get a client_id that I can use with msal-browser to acquire a bearer token for Sharepoint REST API calls. Instead I have come across "apps for Sharepoint Server" where the process seems very different from the Sharepoint Online app registration process.

In short: can I use msal-browser to authenticate when using (an appropriately configured) Sharepoint Subscription Edition, and use tokens acquired with it to call the Sharepoint (Subscription Edition) REST API? If so, are there certain MS doc pages I should be looking at to understand the necessary Sharepoint Server-side configuration as well as app registration?

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,938 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Emily Du-MSFT 45,746 Reputation points Microsoft Vendor
    2024-09-02T08:32:09.4866667+00:00

    According to my research, it is not possible to use msal-browser to authenticate in the SharePoint Subscription Edition.

    In the SharePoint Subscription Edition, you could try to use SharePoint App-Only to grant access.

    Reference:

    https://video2.skills-academy.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs


    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.


  2. Emily Du-MSFT 45,746 Reputation points Microsoft Vendor
    2024-09-04T01:55:19.5966667+00:00

    Yes, Azure Active Directory has a new name as Microsoft Entra ID.

    And per my further research, SharePoint Server Subscription Edition supports using Microsoft Entra ID for authentication and authorization.

    You could follow this Microsoft article and this post to register your application in Microsoft Entra ID and assign it the appropriate permissions to access the SharePoint Server subscription REST API.


    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.