ERROR ~ Invalid Service Principal configuration - Make sure servicePrincipalId and servicePrincipalClient are set in nextflow.config or configured via environment variables
I managed to figure out the problem by looking at the Nextflow source code.
I had an environment variable AZURE_TENANT_ID set even though it was not used in nextflow.config.
After I removed that variable the connection was successful.
Nextflow will find the following environment variables and try to use them:
AZURE_CLIENT_ID
AZURE_CLIENT_SECRET
AZURE_TENANT_ID
AZURE_STORAGE_ACCOUNT_KEY
AZURE_STORAGE_ACCOUNT_NAME
AZURE_STORAGE_ACCOUNT_SAS
AZURE_REGISTRY_USER_NAME
AZURE_REGISTRY_PASSWORD
We need to clarify this in the docs and improve the hierarchy to make sure it takes explicitly set variables first. Thanks for pointing this out @ebragge