Set the following environment variables with appropriate values for your Azure service principal:
set AZURE_CLIENT_ID=your-client-id
set AZURE_TENANT_ID=your-tenant-id
set AZURE_CLIENT_SECRET=your-client-secret
After setting these variables, DefaultAzureCredential will use them to authenticate.