Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

M05-LAB12: Service Principal creation failure #232

@rob-foulkrod

Description

@rob-foulkrod

Contact Details

robfoulkrod@microsoft.com

What happened?

Exercise : 1
Task: 1
Step: 1

Description of issue:
It looks as if the az cli has been updated to require a scope when a role is specified
Repro steps:

  1. execute az ad sp create-for-rbac --name <service-principal-name> --role Contributor in the cloud shell

Solution:
replace the labs code with the following 2 lines.

  SUB_ID=$(az account show --query id --output tsv)
  az ad sp create-for-rbac --name <service-principal-name> --role contributor --scope /subscriptions/$SUB_ID

Lab

Lab 12 Integrating Azure Key Vault with Azure DevOps

Relevant screenshots

image

Do you want to help us? 👏

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions