azure-dev: Error: failed to create or update service principal

  • Make sure you’ve installed the latest version using instructions in the wiki

Output from azd version azd version 0.3.0-beta.1 (commit c5344160ed49bfda75281fba28b5e9ac7b96670e)

Output from az version

{
  "azure-cli": "2.40.0",
  "azure-cli-core": "2.40.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {
    "application-insights": "0.1.7",
    "arcdata": "1.4.5",
    "init": "0.1.0",
    "managementpartner": "0.1.3"
  }
}

Describe the bug Can you please advise if there is a way to do the “azd pipeline config --provider azdo” step, without automaticly creating the service principal, as most tenants and DevOps organisations don’t want individual developers to have this level of access and have already setup a service connection ready to use.

Error: failed to create or update service principal: failed running az ad sp create-for-rbac: exit code: 1, stdout: , stderr: ERROR: Directory permission is needed for the current user to register the application. For how to configure, please refer 'https://docs.microsoft.com/azure/azure-resource-manager/resource-group-create-service-principal-portal'. Original error: Insufficient privileges to complete the operation

To Reproduce Set minimal user rights on Active Directory en run azd pipeline config --provider azdo

Expected behavior Get the opportunity to set/select an existing service connection.

Environment * Visual Studio Code 1.71.2

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

In enterprise scenario, developers typically do not have direct access or rights to create service principal. clientId, teanantId etc. are json output that is captured after running az ad sp. The secret should be captured and configured in GitHub Workflow or AzDo so it should not be something we store on azd side (dev won’t have access.) @jongio @wbreza for input.