User Guide – Generate Client Id and Secret Id

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:

  1. Navigate to SharePoint site (e.g., https://tenant.sharepoint.com)
  2. Open appregnew.aspx page (https://tenant.sharepoint.com/_layouts/15/appregnew.aspx).
    Example:
    Online – https://m365x634254.sharepoint.com/_layouts/15/appregnew.aspx
    On Premises – http://klstsp16:2016/_layouts/15/ appregnew.aspxGenerate Client Id and Secret Id User Guide-image-1
  3. Click “Generate” button against Client Id row to generate a new client id.
  4. Click “Generate” button against Client secret row to generate a new client secret.
  5. Type any Title, which describes your app principal.
  6. Type App domain as www.localhost.com
  7. Specify redirect URI as https://www.localhost.com.
    Generate Client Id and Secret Id User Guide-2
  8. Click Create.
  9. Note down the Client Id and Client Secret for future references.
    Generate Client Id and Secret Id User Guide-3

Steps:

  1. 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://m365x634254.sharepoint.com/_layouts/15/appinv.aspx
    On Premises – http://klstsp16:2016/_layouts/15/ appinv.aspxGenerate Client Id and Secret Id User Guide-4
  2. In the App Id textbox type your generated Client Id
  3. Click the Lookup buttonGenerate Client Id and Secret Id User Guide-5
  4. In the Permission Request XML textbox type below xml,
    <AppPermissionRequests AllowAppOnlyPolicy=”true”>
    <AppPermissionRequest Scope=”http://sharepoint/content/tenant” Right=”FullControl”/> </AppPermissionRequests>
    Generate Client Id and Secret Id User Guide-6
  5. Click Create button
  6. In the next dialog click Trust It button.Generate Client Id and Secret Id User Guide-7

Step 1: Please open the azure portal in browser https://portal.azure.com/#home

OneDriveClientId-step1-n

Step 2:  Please click the “Azure Active Directory
Step 3:  Once Azure Active Directory open after click the “App Registrations”

OneDriveClientId-step3-n

Step 4:  Then Click the “New registration”

OneDriveClientId-step4-n
Step 5: Enter name for the application then click Register.

 OneDriveClientId-step5-2

Step 6: Go to “API Permissions” on the left navigation and click on “Microsoft Graph” to open and update Request API permissions.

OneDriveClientId-step6-n

Step 7: Select and Update the following API / Permissions names for Microsoft Graph:

  • Files.Read.All
  • Files.ReadWrite.All
  • Sites.FullControl.All
  • Sites.Read.All
  • Sites.ReadWrite.All
  • User.Read
  • User.Read.All
  • User.ReadWrite.All

Then click, Grant admin consent for [Tenant Name]

OneDriveClientId-step7

Step 8: Go to “Certificates and secrets” on the left Navigation and click New client secret. Enter Description, Expiration and then Add.
IMPORTANT:
After adding new client secret, save both the Value and Secret ID generated. This is your only chance to save the value and is needed to connect OneDrive.
OneDriveClientId-step8-n-1

Step 9: Go to “Overview” in left navigation, take note of your Client and Tenant ID.

OneDriveClientId-step9-n

Step 10: Now you have the Client ID, Secret ID, Tenant ID generated and ready. This last step shows how to use the values to connect.
Open the netDocShare Sync Admin application, navigate to OneDrive and Add a connection.

OneDriveClientId-step9-n

OneDrive Tenant – Enter a name you would like to use
Tenant ID – Enter the Directory (tenant) ID noted from previous step
Client ID – Enter the Application (client) ID noted from previous step
Client Secret – Enter the Value generated from step 8 from adding new client secret

Step 1: Please open the azure portal in browser https://portal.azure.com/#home

TeamsClientId-step1-n

Step 2:  Please click the “Azure Active Directory
Step 3:  Once Azure Active Directory open after click the “App Registrations”

TeamsClientId-step3-n

Step 4:  Then Click the “New registration”

TeamsClientId-step4-n
Step 5: Enter name for the application then click Register.

 TeamsClientId-step5-2

Step 6: Go to “API Permissions” on the left navigation and click on “Microsoft Graph” to open and update Request API permissions.

TeamsClientId-step6-n

Step 7: Select and Update the following API / Permissions names for Microsoft Graph:
Then click, Grant admin consent for [Tenant Name

  • Files.Read.All
  • Files.ReadWrite.All
  • Group.Read.All
  • Group.ReadWrite.All
  • User.Read
  • User.Read.All
  • User.ReadWrite.All

TeamsClientId-step7

Step 8: Go to “Certificates and secrets” on the left Navigation and click New client secret. Enter Description, Expiration and then Add.
IMPORTANT:
After adding new client secret, save both the Value and Secret ID generated. This is your only chance to save the value and is needed to connect OneDrive.
TeamsClientId-step8-n-1

Step 9: Go to “Overview” in left navigation, take note of your Client and Tenant ID.

TeamsClientId-step9-n

Step 10: Now you have the Client ID, Secret ID, Tenant ID generated and ready. This last step shows how to use the values to connect.
Open the netDocShare Sync Admin application, navigate to Microsoft Teams and Add a connection.

TeamsClientId-step9-n

Teams Tenant – Enter a name you would like to use
Tenant ID – Enter the Directory (tenant) ID noted from previous step
Client ID – Enter the Application (client) ID noted from previous step
Client Secret – Enter the Value generated from step 8 from adding new client secret