Can I register an app in Azure Active directory to access Sharepoint Server Subscription Edition using REST APIs?

captain_atharv 511 Reputation points
2023-10-26T13:09:47.4166667+00:00

Hi,

I have a SharePoint Server Subscription Edition setup and would like to access it using REST APIs. Can I register an app in Azure Active Directory to access the same?

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

Accepted answer
  1. Anonymous
    2023-10-27T05:44:46.5766667+00:00

    Hi@captain_atharv

    SharePoint Server Subscription Edition is a new deployment model that supports using Azure AD for authentication and authorization. This means you can register your application in Azure AD and assign it the appropriate permissions to access the SharePoint Server subscription REST API.

    To register your application in Azure AD,

    Here is a link for your reference:https://learn.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient

    you need to perform the following steps :

    • Sign in to the Azure portal and select your catalog.
    • In the left menu, select Azure Active Directory > App Registration > New Registration.
    • On the Register Application page, enter the name of the application, the redirect URI (if any), and the supported account types.
    • Click the Register button and make a note of your application's Application (client) ID and Directory (tenant) ID.

    In the left menu, select Certificates & Passwords > New Client Password and enter a description and expiration date for the password.

    • Click the Add button and note down the generated client secret.

    To assign permissions to an application, you need to perform the following steps:

    • In the left menu, select API Permissions > Add Permission.
    • On the Request API Permissions page, select SharePoint Server Subscription as the API to access.

    Select the required permission type (Delegate or Application) and check the required permission scope (e.g. Sites.Read.All).

    Click the Add Permission button and wait for the permission to be granted.

    To access a SharePoint Server subscription using the REST API, you need to perform the following steps:

    Use Microsoft Authentication Library (MSAL) to obtain an access token. You can use different programming languages and platforms to achieve this. For example, if you use JavaScript, please refer to :https://learn.microsoft.com/en-us/entra/identity-platform/msal-overview.

    Hope this information is helpful to you. If you have any additional questions, please feel free to ask.


    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.

    Best Regards

    Cheng Feng

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.