Dialogue Cloud

Generate a new client secret for SharePoint Template


Make sure the following pre-requisites are met

  1. User is SharePoint Online global administrators and tenant administrator for the Office 365 tenant

  2. Install SharePoint Online Management Shell


  3. Install Microsoft Online Services Sign-In Assistant


  4. Install PowerShell PowerShellGet

    1. Open PowerShell as administrator

    2. Run:

      Install-Module –Name PowerShellGet –Force

      Update-Module -Name PowerShellGet

  5. Install "Microsoft Online Services"

    1. Open PowerShell as administrator

    2. Run:

      Install-Module -Name MSOnline



  1. Run Powershell as administrator

  2. Run the following cmdlets: (Change the client id value to your client id)


    $clientId = 'clientid'

    $bytes = New-Object Byte[] 32

    $rand = [System.Security.Cryptography.RandomNumberGenerator]::Create()



    $newClientSecret = [System.Convert]::ToBase64String($bytes)

    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Symmetric -Usage Sign -Value $newClientSecret

    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Symmetric -Usage Verify -Value $newClientSecret

    New-MsolServicePrincipalCredential -AppPrincipalId $clientId -Type Password -Usage Verify -Value $newClientSecret


  3. Copy outcome and save it