How To Create Access Tokens From SharePoint Online?

An access key token is used to authenticate your access to Microsoft translator API. It provides secure access to Microsoft Translator API.

Here we can set up OAuth for SharePoint Online to authorize REST API calls to the SharePoint site to retrieve and manipulate the site data.

Below are the detailed steps,SharePoint-2013-Hosting

Step 1

Register an app in SharePoint.

Step 2

Navigate to 

Step 3

Click Generate for Client Id and Client Secret.

Step 4

It will ask to fill in Client Id, Client Secret, Title, App Domain, and Redirect URI.

  • Client Id is a GUID for the SharePoint Add, which we got while registering the App.
  • Client Secret- it is the password for the add-ins. It is associated with the client id; it will be shown again. We need to store it securely or be able to regenerate a new client secret.
  • Title-  You can fill in any name, which is used to display in the add-in trust screen.
  • App Domain- The host of the remote server of the add-in. If the https is not configured in 443, we need to mention the port number.
  • Redirect URI- The endpoint of the remote application to send the ACS authentication code.

Note. The Client’s secret key validity is one year since the creation of your Apps. We will use Powershell to update the key.

Step 5

Generate a new ClientSecret for this clientID. It uses the same clientId as set in the above step. The new ClientSecret is valid for 3 years.

Step 6

Copy the output of $newClientSecret.

Step 7

Replace the Web.config with this ClientId and ClientSecret. You don’t need SecondaryClientSecret app settings.

Step 8

Wait at least 24 hours to propagate ClientSecret to SharePoint Office (SPO)

Create a Package for your Client

Step 1

Open SharePoint Online.

Step 2

Put the URL ” “.

Fill in the details,

After that, you have to click Create a button to get a confirmation screen.

Here are the steps for creating the Access key token in SharePoint online and extending the Client secret using the Powershell command.