You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set the set-azcontext to the current subscription I would like to apply the JIT Access Role.
I am the owner of all the subscriptions in the tenant. I managed to run this successfully once, for the first time. I am trying to recreate this role in subsequent subscriptions for and when I specify any other subscription ID I run into the following error.
New-AzRoleDefinition: /home/enver/Set-JitLeastPrivilegedRole.ps1:86
Line |
86 | $newRole = New-AzRoleDefinition -Role $role
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Operation returned an invalid status code 'Conflict'
Fail to create JIT Access Role
To Reproduce
Steps to reproduce the behaviour:
Run Set-AzContext -Subscription 'xxxx'
Run ./Set-JitLeastPrivilegedRole.ps1 -subscriptionId 'xxxx'
See error
Expected behaviour
I am able to run this command against any other subscription to recreate this role.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have set the set-azcontext to the current subscription I would like to apply the JIT Access Role.
I am the owner of all the subscriptions in the tenant. I managed to run this successfully once, for the first time. I am trying to recreate this role in subsequent subscriptions for and when I specify any other subscription ID I run into the following error.
New-AzRoleDefinition: /home/enver/Set-JitLeastPrivilegedRole.ps1:86
Line |
86 | $newRole = New-AzRoleDefinition -Role $role
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Operation returned an invalid status code 'Conflict'
Fail to create JIT Access Role
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
I am able to run this command against any other subscription to recreate this role.
The text was updated successfully, but these errors were encountered: