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 is mycompany.onmicrosoft.com, the Tenant Name would be mycompany.
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.
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:
Copy
Ask AI
openssl req -new -key private.key -out csr.csr
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.
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.