Generating Client ID and Client Secret ID for SharePoint Cloud

Generating Client ID and Client Secret ID for SharePoint Cloud





A picture containing logoDescription automatically generated



imDocShare Sync Installation 

Guide for Generating Client ID and Client Secret for SharePoint Cloud


Generate Client Id and Secret

App-Only Authentication:
App-Only is a model for setting up app principals. It can be used with SharePoint Online, as will SharePoint on-premises (SharePoint 2013 and above versions).

Steps:

Navigate to SharePoint site (e.g., https://tenant.sharepoint.com)
Open appregnew.aspx page (https://tenant.sharepoint.com/_layouts/15/appregnew.aspx).

Example:
https://m365x35439636.sharepoint.com/_layouts/15/appregnew.aspx

A screenshot of a computerDescription automatically generated

Click “Generate” button against Client Id row to generate a new client id.
Click “Generate” button against Client secret row to generate a new client secret.
Type any Title, which describes your app principal.
Type App domain as www.localhost.com
Specify redirect URI as https://www.localhost.com.


A screenshot of a computerDescription automatically generated

Click Create.
Note down the Client Id and Client Secret for future references.

A screenshot of a computerDescription automatically generated


Grant’s tenant scoped permissions to the newly created principal.

Steps:

Open SharePoint Tenant site with Tenant Administrator account (https://tenantname.sharepoint.com/_layouts/15/appinv.aspx, https://tenantname-admin.sharepoint.com/_layouts/15/appinv.aspx)

Example:

Online – https://m365x35439636.sharepoint.com/_layouts/15/appinv.aspx
On Premises – http://klstsp16:2016/_layouts/15/ appinv.aspx
In the App Id textbox type your generated Client Id
Click the Lookup button

A screenshot of a computerDescription automatically generated 

In the Permission Request XML textbox type below xml,
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl"/>     </AppPermissionRequests>



A screenshot of a computerDescription automatically generated


Click Create button
In the next dialog click Trust It button.

A screenshot of a computerDescription automatically generated

Add Tenant Name, Tenant URL, Client ID, Secret generated and ready. 

This last step shows how to use the values to connect.
Open the imDocShare Sync Admin application, navigate to SharePoint and Add a connection.

A screenshot of a computerDescription automatically generated