wangzelin007 / github-bot-tutorial

learn github bot
MIT License
1 stars 1 forks source link

Unofficial Azure CLI #132

Open wangzelin007 opened 1 year ago

wangzelin007 commented 1 year ago

Describe the bug

Not sure how to go about fixing this - getting an error shown at the title of the issue.

Command Name az ad sp create-for-rbac

Errors:

The command failed with an unexpected error. Here is the traceback:
'RoleAssignmentsOperations' object has no attribute 'config'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 718, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/usr/lib/python3/dist-packages/azure/cli/command_modules/role/commands.py", line 51, in graph_err_handler
    raise ex
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/lib/python3/dist-packages/azure/cli/command_modules/role/custom.py", line 1246, in create_service_principal_for_rbac
    _create_role_assignment(cmd.cli_ctx, role, sp_oid, None, scope, resolve_assignee=False,
  File "/usr/lib/python3/dist-packages/azure/cli/command_modules/role/custom.py", line 198, in _create_role_assignment
    assignments_client.config.subscription_id)
AttributeError: 'RoleAssignmentsOperations' object has no attribute 'config'

To Reproduce:

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

Expected Behavior

Environment Summary

Linux-6.0.0-kali5-amd64-x86_64-with-glibc2.36, Kali GNU/Linux Rolling
Python 3.10.9
Installer: DEB

azure-cli 2.43.0

Extensions:
azure-devops 0.25.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.2.1

Additional Context

azure-client-tools-bot-2[bot] commented 1 year ago

Hi @wangzelin007,

This is not the official Azure CLI published by Microsoft.

How to tell if the installed Azure CLI is unofficial:

Please follow https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt to install Microsoft official Azure CLI.

If you feel that further discussion is needed, please add a comment with the text /clibot unresolve to reopen the issue.

wangzelin007 commented 1 year ago

/clibot unresolve