Create a new service principal
To create a new service principal, see Azure documentation:
https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-service-principal-portal
While creating the service principal, use the application (client) ID, directory (tenant) ID, and secret key that you have created.
Ensure that you assign your custom role to the service principal.