John Little
John Little

Reputation: 12413

how to renew client secret for sharepoint rest API?

This artile: https://anoopt.medium.com/accessing-sharepoint-data-using-postman-sharepoint-rest-api-76b70630bcbf

Explains how to generate a client ID, secret and set permissions so an application (java in our case) can add documents to sharepoint (not as a user, as a service)

It uses two hidden admin pages to a) create a new application credential set, b) to assign permissions.

  1. https://yourtenantname.sharepoint.com/_layouts/15/appregnew.aspx
  2. https://yourtenantname.sharepoint.com/_layouts/15/appinv.aspx

Our secret has now expired.

How can we generate a new secret? The only options sharepoint seem to provide is to create a new app, which gives a new client ID, which we don't have the ability to update on the fly in our app.

Upvotes: 1

Views: 2583

Answers (1)

alexg
alexg

Reputation: 683

You are correct that .../AppRegNew.aspx is used to create new app/clientID/secret and is by default valid for 1 year.

To create a new client secret for an existing clientID with custom expiration date use the steps specified here:

https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in

Upvotes: 1

Related Questions