Skip to content

az aro create command failed with error azure.cli.command_modules.role._msgrpah._graph_client.GraphError: Insufficient privileges to complete the operation #25774

@lkalaivanan

Description

@lkalaivanan

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az aro create

Errors:

The command failed with an unexpected error. Here is the traceback:
Insufficient privileges to complete the operation.
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/command_modules/role/_msgrpah/_graph_client.py", line 52, in _send
    r = send_raw_request(self._cli_ctx, method, url, resource=self._resource, uri_parameters=param,
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/util.py", line 993, in send_raw_request
    raise HTTPError(reason, r)
azure.cli.core.azclierror.HTTPError: Forbidden({"error":{"code":"Authorization_RequestDenied","message":"Insufficient privileges to complete the operation.","innerError":{"date":"2023-03-12T17:22:04","request-id":"305e665c-98c8-46fe-852d-f02073c75d7d","client-request-id":"305e665c-98c8-46fe-852d-f02073c75d7d"}}})

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/command_modules/aro/custom.py", line 78, in aro_create
    client_id, client_secret = aad.create_application(cluster_resource_group or 'aro-' + random_id)
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/command_modules/aro/_aad.py", line 24, in create_application
    app = self.client.application_create(request_body)
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/command_modules/role/_msgrpah/_graph_client.py", line 91, in application_create
    result = self._send("POST", "/applications", body=body)
  File "/opt/homebrew/lib/python3.10/site-packages/azure/cli/command_modules/role/_msgrpah/_graph_client.py", line 55, in _send
    raise GraphError(ex.response.json()['error']['message'], ex.response) from ex
azure.cli.command_modules.role._msgrpah._graph_client.GraphError: Insufficient privileges to complete the operation.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az group create --name {}--location eastus
  • az network vnet create --resource-group {} --name {} --address-prefixes 10.0.0.0/22
  • az network vnet subnet create --resource-group {} --vnet-name {} --name {} --address-prefixes 10.0.0.0/23 --service-endpoints Microsoft.ContainerRegistry
  • az network vnet subnet create --resource-group {} --vnet-name {} --name {} --address-prefixes 10.0.2.0/23 --service-endpoints Microsoft.ContainerRegistry
  • az network vnet subnet update --name {} --resource-group {} --vnet-name {} --disable-private-link-service-network-policies true
  • az aro create --resource-group {} --name {} --vnet {} --master-subnet {} --worker-subnet {} --worker-count {}

Expected Behavior

Environment Summary

macOS-12.0.1-arm64-arm-64bit
Python 3.10.8
Installer: PIP

azure-cli 2.39.0 *

also tried with flowing azure-cli versions 2.43.0 and 2.46.0

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    AROaz aro (Azure Redhat OpenShift)Auto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions