Sign into the Azure Portal with admin credentials.
Navigate to Azure Active Directory > App registrations.
Click New registration.
Enter your application name, select account type (e.g., Single or Multitenant).
Set the Redirect URI (type: Web). This can be your application's URI or http://localhost for dev/test.
Click Register.
In the Overview tab, copy the Application (client) ID — this is your sharepoint_client_id.
Official docs: Microsoft Docs - Register an Application
Under your app registration, go to Certificates & secrets.
Under Client secrets, click New client secret.
Add a description and select an expiry period.
Click Add.
Copy the generated secret value and store it securely — this is your sharepoint_client_secret. (You won't be able to view it again after leaving the page)
Official docs: Microsoft Docs - Add a Client Secret
Under API permissions, click Add a permission.
Choose SharePoint and select required permissions (e.g., Sites.ReadWrite.All, Sites.Read.All).
If you will use Microsoft Graph API, add its permissions as well.
Click Add permissions and have an admin grant consent.
Official docs: Microsoft Docs - Configure Permissions