...
Open Azure Active Directory in Azure Portal
In the left panel, under the Manage section, click App registrations.
In the Owned applications section, search and select the name of the service principal you want to use.
Copy the Application (client) ID (also known as Service Principal Client ID) and Directory (tenant) ID (also known as Tenant ID). You can find these IDs on the Overview screen.
If you already have a client secret, you can continue using it. Otherwise, you can create a new client secret. To create a secret, click Certificates and Secret in the Manage section.
Click +New client secret to create a new secret. The Add a client secret dialog is displayed.
Click Add. The client secret is added.
Copy the valuedisplay in the Value column.