Errors Role assignment creation failed & subscription identifier is malformed or invalid.

Gautam De 25 Reputation points
2024-03-20T21:55:36.4433333+00:00

I am preparing for Azure DevOps exam.

Using this link, trying to create service principal.

(link: https://microsoftlearning.github.io/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/Instructions/Labs/AZ400_M03_L05_Implementing_GitHub_Actions_for_CI_CD.html)

But getting errors:

  1. Creating 'contributor' role assignment under scope '/subscriptions/gd_az_sub1/resourceGroups/gd_rg2' Role assignment creation failed.
  2. (InvalidSubscriptionId) The provided subscription identifier 'gd_az_sub1' is malformed or invalid. Code: InvalidSubscriptionId

I am AWS certified but new in Azure. I think I am missing some steps.

Any help would be much appreciated. Thank you.

Gautam

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.
710 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Navya 6,200 Reputation points Microsoft Vendor
    2024-03-21T12:43:15.95+00:00

    Hi @Gautam De ,

    Thank you for posting this in Microsoft Q&A.

    I understand you got the error "Role assignment creation failed & subscription identifier is malformed or invalid" while creating service principal.

    You may encounter the "Role assignment creation failed" error when incorrect values or parameters are being passed to create the service principal and rbac for service principal.

    Noticed someone have posted similar query in stack overflow https://stackoverflow.com/questions/77466378/why-did-role-assignment-creation-failed where one of the community members have answered it. I am updating the same here if anyone looking for similar issue on QnA will help them.

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it.

    0 comments No comments