Dialogue Cloud

Generate a new client secret for SharePoint Template


Make sure the following prerequisites 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 PowerShell PowerShellGet

    1. Open PowerShell as administrator

    2. Run:

      Install-Module –Name PowerShellGet –Force

      Update-Module -Name PowerShellGet

  4. Install "Microsoft Online Services"

    1. Open PowerShell as administrator

    2. Run:

      Install-Module -Name MSOnline



Note: Generating a new secret won’t affect to old one, the current Client Secret will be active until it expires

Note: If the client secret is already expired, creating a new app is recommended: UCC Creator - Install Manual “Register SharePoint App (only for SharePoint Online)”

  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