question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updating azure role definition gives error

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az role definition update

Errors:

The command failed with an unexpected error. Here is the traceback:
'roleName'
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/role/custom.py", line 71, in update_role_definition
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/role/custom.py", line 101, in _create_update_role_definition
KeyError: 'roleName'

To Reproduce:

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

  • Put any pre-requisite steps here…
  • az role definition update --role-definition {}

Expected Behavior

Environment Summary

Windows-10-10.0.25231-SP0
Python 3.10.5
Installer: MSI

azure-cli 2.41.0

Extensions:
account 0.2.3
managementpartner 0.1.3

Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aavdbergcommented, Nov 1, 2022

@oxbo-andre is my account at the customer

1reaction
aavdbergcommented, Nov 1, 2022

I think that it had to do with token that was expired because when i did az logout and then az login it did not happen anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Azure RBAC | Microsoft Learn
Symptom - Unable to create or update a custom role ... This error usually indicates that you do not have permissions to one...
Read more >
Understand Azure role definitions - Microsoft Learn
Learn about Azure role definitions in Azure role-based access control (Azure RBAC) for fine-grained access management of Azure resources.
Read more >
Troubleshoot Azure role assignment conditions - Microsoft Learn
Open Azure Active Directory > Custom security attributes to see if custom security attributes have been defined and which ones you have access ......
Read more >
Create or update Azure custom roles using the Azure portal
In the Azure portal, open a subscription or resource group where you want the custom role to be assignable and then open Access...
Read more >
Troubleshoot common Azure deployment errors
Error code Mitigation More inform... AccountNameInvalid Follow naming guidelines for storage accounts. Resolve erro... AccountPropertyCannotBeSet Check available storage account properties. storageAcco... AnotherOperationInProgress Wait for concurrent operation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found