Error configuring kubernetes cluster to github actions.

Uday Kiran Reddy (ureddy) 86 Reputation points
2021-10-28T09:48:01.99+00:00

I followed this link and tried to configure a service principal.

But got below error.

az ad sp create-for-rbac --name "myApp" --role contributor --scopes /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP> --sdk-auth

az ad sp create-for-rbac --name "githubActionsApp" --role contributor --scopes /subscriptions/01f7b0dd-dba4-4502-94ce-7c8cde09b954/resourceGroups/martserverqa --sdk-auth

But got below error.

PS C:\Users\UReddy> az ad sp create-for-rbac --name "githubActionsApp" --role contributor --scopes /subscriptions/01f7b0dd-dba4-4502-94ce-7c8cde09b954/resourceGroups/martserverqa --sdk-auth
Changing "githubActionsApp" to a valid URI of "http://githubActionsApp", which is the required format used for service principal names
Values of identifierUris property must use a verified domain of the organization or its subdomain: 'http://githubActionsApp'

Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
655 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,843 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,316 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 13,131 Reputation points Microsoft Employee
    2021-11-01T15:16:55.443+00:00

    Hello @Uday Kiran Reddy (ureddy) ,
    Are you still facing the same issue ?
    I don't see any issue with the command , Can you retry the command with a different name ServicePrincipal Name?
    Can you also try the command with out assigning the role i.e. az ad sp create-for-rbac --name "githubActionsApp"

    Regards,
    Shiva.