SharePoint Online (v1) - How do I link my account?
Overview
To authenticate with SharePoint Online (v1), you need:
- Tenant ID - The unique identifier for your organization that uses Microsoft services.
- Tenant Name - The initial domain name for your Microsoft services tenant.
- Client ID - The unique identifier that Azure assigns to your application when it’s registered.
- Client Assertion - A unique string that enables client applications to access Azure resources without requiring users to provide their credentials.
This guide will walk you through generating and finding these credentials within Azure.
Prerequisites:
- You must have an Azure account with an active SharePoint subscription.
Instructions:
Step 1: Finding your Tenant ID
- Your Tenant ID can be found in the Tenant ID field on the Overview page.
Step 2: Finding your Tenant Name
- Your Tenant Name can be found in the Primary domain field on the Overview page. It is the text that appears before
onmicrosoft.com
. For example, if the primary domain ismycompany.onmicrosoft.com
, the Tenant Name would bemycompany
.
Step 3: Finding your Client ID
- Navigate to the Azure portal home page and sign in using the credentials of an administrator.
- Select App registrations.
- Select New registration.
- In the Register an application section, enter a meaningful application name to display to users. Select who can use this application based on your environment and click Register.
- Once you have registered your application, your Client ID will be displayed in the Application (client) ID field within the Essentials.
Step 4: Generating your Client Assertion
- After successfully registering your application in Step 3: Finding your Client ID, the next step is to generate a client assertion for the registered application. To do this, you must first create a private key and a certificate for your application. This guide will walk you through generating these locally.
- Run the following command to generate a 2048-bit RSA private key:
- Run the following to create a CSR based on the private key generated above:
- You will be prompted to enter information such as country, organization, and Common Name (CN). Make sure that the CN matches the identity of your application.
- Use the CSR to create a self-signed certificate:
- This will generate a .crt certificate that is valid for 10 years.
- To convert the certificate and private key to PEM format:
- Once the above certificate is generated, navigate to App registrations and select your above registered application.
- Under the Client credentials section, click Add a certificate or Secret.
- Choose the .crt certificate file you generated above and upload it.
- After uploading, the thumbprint and certificate details will appear in the portal.
- Now that your certificate is registered with Microsoft, you need to generate a JWT Client Assertion using the private key and the certificate’s thumbprint. You can use the code from the following script to generate the JWT.
- Run the script above in the same directory where your certificates were generated. It will prompt you for your Client ID, Tenant ID, and the Password set during the certificate generation process. A JWT Client Assertion will then be generated.
Note: The generated Client Assertion is valid for ten years. After this period, you will need to regenerate the assertion and reauthenticate.
Once you have your credentials:
- Open the form where you need to authenticate with SharePoint Online (v1).
- Enter the Tenant ID, Tenant Name, Client ID and Client Assertion in their designated fields.
- Submit the form, and you should be successfully authenticated.
You are now connected to SharePoint Online (v1).
Was this page helpful?