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