Receiving "Login failed with Error: Using auth-type: SERVICE_PRINCIPAL" When running GitHub Workflow

AJ 20 Reputation points


I'm following this MS Learn Exercise and running into a login issue.

Error: Login failed with Error: Using auth-type: SERVICE_PRINCIPAL. Not all values are present. Ensure 'client-id' and 'tenant-id' are supplied.. Double check if the 'auth-type' is correct. Refer to for more information.

I'm unsure why I'm running into this issue. I confirmed the client-id and tenant-id are stored in Github Secrets. Any help or guidance would greatly be appreciated.

Here is the workflow file.

name: Deploy ARM Template
      - main
  AZURE_SUBSCRIPTION_ID: '[REDACTED]'  # set this to your Azure Subscription Id
  AZURE_RESOURCE_GROUP: GitHubActionExercise-rg   # set this to your target resource group
    runs-on: ubuntu-latest
      - name: Checkout source code
        uses: actions/checkout@main
      - name: Login to Azure
        uses: azure/login@v1
          creds: ${{ secrets.AZURE_CREDENTIALS }}
      - name: Deploy ARM Template
        uses: azure/arm-deploy@v1
          scope: resourcegroup
          subscriptionId: ${{ env.AZURE_SUBSCRIPTION_ID }}
          resourceGroupName: ${{ env.AZURE_RESOURCE_GROUP }}
          template: ./azuredeploy.json

GitHub Secrets AZURE_CREDENTIALS Contents:

  "clientId": "[REDACTED]",
  "clientSecret": "[REDACTED]",
  "subscriptionId": "[REDACTED]",
  "tenantId": "[REDACTED]",
  "activeDirectoryEndpointUrl": "",
  "resourceManagerEndpointUrl": "",
  "activeDirectoryGraphResourceId": "",
  "sqlManagementEndpointUrl": "",
  "galleryEndpointUrl": "",
  "managementEndpointUrl": ""

Any help would greatly be appreciated.


This question is related to the following Learning Module

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,168 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rakesh Gurram 4,805 Reputation points Microsoft Vendor

    Hi AJ,

    Thank you for your patience.

    We have successfully replicated the steps within the module. Please ensure that your assigned role is 'Contributor.' If it is not, assign yourself the 'Contributor' role and avoid using restricted Azure directories. Additionally, verify that the client secrets in both the CLI and GitHub secrets are correct and save them under Action secrets.

    User's image


    This has been created resource within the given resource group. Resource Group>>Settings>>Deployments>>Created Resource (VNet) as shown:

    User's image

    Please don't hesitate to reach out to us if you have any other queries with screenshots of the error (after concealing your PII).

    If the information is helpful, please Accept Answer & Upvote so that it would be helpful to other community members.

    Thank you.