Error configuring kubernetes cluster to github actions.

Uday Kiran Reddy (ureddy) 96 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.
968 questions
Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,447 questions
Microsoft Security Microsoft Entra Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. shiva patpi 13,366 Reputation points Microsoft Employee Moderator
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.