Renewing a Client Secret
Microsoft provides documentation for replacing an expiring or expired client secret in a SharePoint Add-ins, and it should always be the primary source of instructions for updating a client secret. This help page will serve as a guide to updating the client secret but we rely mainly on Microsoft's Client secret documentation since this entire process is controlled by Microsoft and Gimmal is not responsible for the validity and accuracy of instructions over its lifetime.
See the following sections to renew your client secret for the on-premises and Gimmal Cloud versions of the SharePoint Online Connector.
On-Premises
To renew a client secret for SharePoint Online Connector.on-premises, you must execute the following PowerShell Command on the SharePoint Online Connector Server, as shown below:
$secret = New-SPOClientSecret
Set-ServicePrincipalClientSecret –ClientId { Your Client Id} –ClientSecret $secret
Set-SPOConnectorService –ClientId { Your Client Id} –ClientSecret $secret
Set-SPOConnectorWeb -SiteName “SPOnline Connector Web” –ClientId { Your Client Id} –ClientSecret $secret
Gimmal Cloud
To renew a client secret for SharePoint Online Connector in the Gimmal Cloud, there are some steps you must perform in addition to the steps listed in Microsoft's documentation.
Perform the steps in Microsoft's client secret documentation to renew the client secret. Note the important sections on how to find out a client secret's expiration date, and how to create a client secret that is valid for three years.
Make note of your Client Secret value.
Submit a Gimmal Support ticket, providing the Client Secret value that you generated in step 1. (Gimmal Support must perform some additional steps to complete the renewal of your client secret.)
For additional information on renewing a client secret, including how to create a new client secret, how to extend an existing client secret, and how to use the Gimmal Extend Client Secret Script, see the following Knowledge Base article located at the Gimmal Support site.