Renew Expiring SharePoint Client Secret

Overview

SharePoint Add-ins are initially registered using the AppRegNew.aspx page and expire after one year. Prior to this expiration, the secret must be renewed. The renewal can be for up to two years.

Prerequisites

Windows PowerShell with the Microsoft.Graph.Applications modules must be installed.
Open Windows PowerShell and use the following command to check if Microsoft.Graph.Applications module is installed:
Get-InstalledModule Microsoft.Graph.Applications

If the Microsoft.Graph.Applications module is not installed, execute the following command to install it:
Install-Module Microsoft.Graph.Applications

Script Execution

  1. Run the following command to define the client ID you will be updating.
    $clientId = ‘client id of the add-in’
    This will be one of the following, based on the product:
    – Portal: $clientId = ‘b551aa9a-9a72-4e0f-933e-ae4c440b38f8’ 
    – EasyAP365: $clientId = ‘e7dddd9f-d5d8-48ee-ae35-5bbcea04111d’
    – EasyEXP365: $clientId = ‘2600d911-9ef7-4991-b61d-08a252e3a37a’
  2. Download the PowerShell script from here.
  3. Then navigate to the script file, according to your directory location, and execute it:
  4. Complete the sign-in process using your global administrator account. Permission consent may need to be granted if this module is used for the first time:
  5. Provide the new secret and expiration to DynamicPoint at support@dynamicpoint.com.