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).


  1. Navigate to SharePoint site (e.g.,
  2. Open appregnew.aspx page (
    Generate 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
  7. Specify redirect URI as
    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


  1. Open SharePoint Tenant site with Tenant Administrator account (,
    Online –
    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


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


Step 4:  Then Click the “New registration”

Step 5: New App register page open, now register the App.


Step 6: Once register after our app page is open, now click the “API Permissions”


Step 7: Now provide the permission for API’s , please refer the below screen shot.


Step 8: Now click the “Certificates and Secrets” and generate the Client Secret Id


Step 9: Finally Click the “Overview”, once page open after you get the client ID and Tenant Id


Step 10: Now you get Client Id and Secret Id and Tenant Id, This Id’s used create the OneDrive sync job in Sync APP