Creating a Custom OAuth App
When to Create a Custom OAuth App
You might want to create a custom OAuth app to change the information displayed when users log into the SharePoint OAuth endpoint to grant permissions to the adapter.
Follow the steps below to create a custom OAuth app and obtain the connection properties in a specific OAuth authentication flow.
Steps to Create a Custom OAuth App
Follow the steps below to obtain the OAuth values for your app, the OAuthClientId and OAuthClientSecret.
- Log in to https://portal.azure.com.
- In the left-hand navigation pane, select Azure Active Directory then App Registrations and click the Add button.
- Enter an app name and set the radio button for "Any Azure AD Directory - Multi Tenant". Then set the redirect url to something such as http://localhost:33333, the adapter's default. Or, set a different port of your choice and set CallbackURL to the exact reply URL you defined.
- After creating the app, go to the Certificates & Secrets section, create a Client Secret for the app and select a duration.
- After you save the key, a value for the key is displayed once. Set OAuthClientSecret to the key value. Set OAuthClientId to the Application Id.
- Select API Permissions and then click Add. when selecting permissions, use the Delegated permissions.
- In the API Permissions section, click on Add a permission and select Sharepoint. And choose the permissions you want your app to have. To view and edit lists you have to select at least the permission, AllSites.Manage.
- Save your changes.
- If you have selected to use permissions that require admin consent, you may grant them from the current tenant on the API Permissions page. Otherwise, follow the steps under Admin Consent.