-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-AzResourceLock : NoRegisteredProviderFound #18691
Comments
Thank you for your feedback. This has been routed to the support team for assistance. |
@hbuckle Apologies for the late reply. Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update. |
@hbuckle Could you please run the below command in order and check if that helps? Awaiting your reply.
|
Fixes Azure#18691 LockApiVersion="2016-09-01" needs to be changed to "2017-04-01" More Info: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/resources/resource-manager/Microsoft.Authorization/stable/2017-04-01
I've tried the following $api_version = '2022-01-01-preview'
$uri = "https://management.azure.com/subscriptions/${subscription_id}/resourceGroups/${resource_group_name}/providers/Microsoft.ServiceBus/namespaces/${namespace_name}/providers/Microsoft.Authorization/roleAssignments/${role_assignment_id}/providers/Microsoft.Authorization/locks?api-version=${api_version}"
Invoke-RestMethod -Authentication Bearer -Token $token -Uri $uri
$api_version = '2017-04-01'
$uri = "https://management.azure.com/subscriptions/${subscription_id}/resourceGroups/${resource_group_name}/providers/Microsoft.ServiceBus/namespaces/${namespace_name}/providers/Microsoft.Authorization/roleAssignments/${role_assignment_id}/providers/Microsoft.Authorization/locks?api-version=${api_version}"
Invoke-RestMethod -Authentication Bearer -Token $token -Uri $uri
$api_version = '2017-04-01'
$uri = "https://management.azure.com/subscriptions/${subscription_id}/resourceGroups/${resource_group_name}/providers/Microsoft.ServiceBus/namespaces/${namespace_name}/providers/Microsoft.Authorization/locks?api-version=${api_version}"
Invoke-RestMethod -Authentication Bearer -Token $token -Uri $uri The first 2 return an error
The third one (without the roleassignments) works correctly |
@hbuckle Thanks for the update. The above PR is also merged now to use the version'2017-04-01' for the locks. |
Description
Running
Get-AzResourceLock
with the scope set to a role assignment ID returns an errorIssue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: