Skip to content
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

Closed
hbuckle opened this issue Jun 23, 2022 · 5 comments · Fixed by #18780
Closed

Get-AzResourceLock : NoRegisteredProviderFound #18691

hbuckle opened this issue Jun 23, 2022 · 5 comments · Fixed by #18780
Assignees
Labels
ARM - Core bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported CXP Attention [Deprecated] The Azure CXP Support Team is responsible for this issue. needs-author-feedback More information is needed from author to address the issue.

Comments

@hbuckle
Copy link

hbuckle commented Jun 23, 2022

Description

Running Get-AzResourceLock with the scope set to a role assignment ID returns an error

Get-AzResourceLock -Scope "/subscriptions/${subscription_id}/resourceGroups/${resource_group}/providers/Microsoft.ServiceBus/namespaces/${namespace}/providers/Microsoft.Authorization/roleAssignments/${id}"

Get-AzResourceLock: NoRegisteredProviderFound : No registered resource provider found for location 'uksouth' and API version '2015-01-01' for type 'namespaces'. The supported api-versions are '2014-09-01, 2015-08-01, 2017-04-01, 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview'. The supported locations are 'australiaeast, australiasoutheast, centralus, eastus, eastus2, westus2, westus, northcentralus, southcentralus, westcentralus, eastasia, southeastasia, brazilsouth, japaneast, japanwest, northeurope, westeurope, centralindia, southindia, westindia, canadacentral, canadaeast, ukwest, uksouth, koreacentral, koreasouth, francecentral, southafricanorth, uaenorth, australiacentral, switzerlandnorth, germanywestcentral, norwayeast, jioindiawest, westus3, swedencentral'.

Issue script & Debug output

DEBUG: 09:05:51 - GetAzureResourceLockCmdlet begin processing with ParameterSet 'BySpecifiedScope'.
DEBUG: 09:05:51 - using account id 'xxx'...
DEBUG: 09:05:51 - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: [Common.Authentication]: Authenticating using Account: 'xxx', environment: 'AzureCloud', tenant: 'xxx'
DEBUG: 09:05:51 - [SilentAuthenticator] Calling SharedTokenCacheCredential.GetTokenAsync - TenantId:'xxx', Scopes:'https://management.core.windows.net//.default', AuthorityHost:'https://login.microsoftonline.com/', UserId:'xxx'
DEBUG: SharedTokenCacheCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - 740ed65c-d5c5-4bc3-ad7c-8ebbd91c5edc] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - 740ed65c-d5c5-4bc3-ad7c-8ebbd91c5edc] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - 740ed65c-d5c5-4bc3-ad7c-8ebbd91c5edc] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - 740ed65c-d5c5-4bc3-ad7c-8ebbd91c5edc] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - 740ed65c-d5c5-4bc3-ad7c-8ebbd91c5edc] IsLegacyAdalCacheEnabled: yes
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11] Found 1 cache accounts and 0 broker accounts
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11] Returning 1 accounts
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] MSAL MSAL.NetCore with assembly version '4.39.0.0'. CorrelationId(eaf22c4e-5f01-40eb-8229-6dea26259f82)
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] === AcquireTokenSilent Parameters ===
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] LoginHint provided: False
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] Account provided: True
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] ForceRefresh: False
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82]
=== Request Data ===
Authority Provided? - True
Scopes - https://management.core.windows.net//.default
Extra Query Params Keys (space separated) -
ApiId - AcquireTokenSilent
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - eaf22c4e-5f01-40eb-8229-6dea26259f82
UserAssertion set: False
LongRunningOboCacheKey set: False

DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] === Token Acquisition (SilentRequest) started:
         Scopes: https://management.core.windows.net//.default
        Authority Host: login.microsoftonline.com
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] Access token is not expired. Returning the found cache entry. [Current time (06/23/2022 08:05:51) - Expiration Time (06/23/2022 09:24:41 +00:00) - Extended Expiration Time (06/23/2022 09:24:41 +00:00)]
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] Returning access token found in cache. RefreshOn exists ? False
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] [Region discovery] Not using a regional authority.
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82] Fetched access token from host login.microsoftonline.com.
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82]
        === Token Acquisition finished successfully:
DEBUG: False MSAL 4.39.0.0 MSAL.NetCore .NET 6.0.5 Microsoft Windows 10.0.19044 [06/23 08:05:51.11 - eaf22c4e-5f01-40eb-8229-6dea26259f82]  AT expiration time: 23/06/2022 09:24:41 +00:00, scopes https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default source Cache from login.microsoftonline.com appHashCode 14175094
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:  ExpiresOn: 2022-06-23T09:24:41.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'xxx', UserId: 'xxx'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ServiceBus/namespaces/xxx/providers/Microsoft.Authorization/roleAssignments/xxx/providers/Microsoft.Authorization/locks?api-version=2015-01-01

Headers:
User-Agent                    : AzurePowershell/v8.0.0,PSVersion/v7.2.4,Az.ServiceBus/1.9.0,Az.Accounts/2.8.0,Az.Resources/6.0.0
ParameterSetName              : BySpecifiedScope
CommandName                   : Get-AzResourceLock

Body:



DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-failure-cause            : gateway
x-ms-request-id               : 5802d29b-153f-4072-9747-b8224cd8959b
x-ms-correlation-request-id   : 5802d29b-153f-4072-9747-b8224cd8959b
x-ms-routing-request-id       : UKSOUTH:20220623T080551Z:5802d29b-153f-4072-9747-b8224cd8959b
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 23 Jun 2022 08:05:50 GMT

Body:
{
  "error": {
    "code": "NoRegisteredProviderFound",
    "message": "No registered resource provider found for location 'uksouth' and API version '2015-01-01' for type 'namespaces'. The supported api-versions are '2014-09-01, 2015-08-01, 2017-04-01, 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview'. The supported locations are 'australiaeast, australiasoutheast, centralus, eastus, eastus2, westus2, westus, northcentralus, southcentralus, westcentralus, eastasia, southeastasia, brazilsouth, japaneast, japanwest, northeurope, westeurope, centralindia, southindia, westindia, canadacentral, canadaeast, ukwest, uksouth, koreacentral, koreasouth, francecentral, southafricanorth, uaenorth, australiacentral, switzerlandnorth, germanywestcentral, norwayeast, jioindiawest, westus3, swedencentral'."
  }
}


DEBUG: 09:05:51 - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
Get-AzResourceLock: NoRegisteredProviderFound : No registered resource provider found for location 'uksouth' and API version '2015-01-01' for type 'namespaces'. The supported api-versions are '2014-09-01, 2015-08-01, 2017-04-01, 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview'. The supported locations are 'australiaeast, australiasoutheast, centralus, eastus, eastus2, westus2, westus, northcentralus, southcentralus, westcentralus, eastasia, southeastasia, brazilsouth, japaneast, japanwest, northeurope, westeurope, centralindia, southindia, westindia, canadacentral, canadaeast, ukwest, uksouth, koreacentral, koreasouth, francecentral, southafricanorth, uaenorth, australiacentral, switzerlandnorth, germanywestcentral, norwayeast, jioindiawest, westus3, swedencentral'.
CorrelationId: 5802d29b-153f-4072-9747-b8224cd8959b
DEBUG: 09:05:51 - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent: Module: Az.Resources:6.0.0; CommandName: Get-AzResourceLock; PSVersion: 7.2.4; IsSuccess: False; Duration: 00:00:00.2330418; Exception: NoRegisteredProviderFound : No registered resource provider found for location 'uksouth' and API version '2015-01-01' for type 'namespaces'. The supported api-versions are '2014-09-01, 2015-08-01, 2017-04-01, 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview'. The supported locations are 'australiaeast, australiasoutheast, centralus, eastus, eastus2, westus2, westus, northcentralus, southcentralus, westcentralus, eastasia, southeastasia, brazilsouth, japaneast, japanwest, northeurope, westeurope, centralindia, southindia, westindia, canadacentral, canadaeast, ukwest, uksouth, koreacentral, koreasouth, francecentral, southafricanorth, uaenorth, australiacentral, switzerlandnorth, germanywestcentral, norwayeast, jioindiawest, westus3, swedencentral'.
CorrelationId: 5802d29b-153f-4072-9747-b8224cd8959b;
DEBUG: Finish sending metric.
DEBUG: 09:05:51 - GetAzureResourceLockCmdlet end processing.

Environment data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.4
PSEdition                      Core
GitCommitId                    7.2.4
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

Get-Module Az*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.8.0                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     4.5.0                 Az.KeyVault                         {Add-AzKeyVaultCertificate, Add-AzKeyVaultCertificateContact, Add-AzKeyVaultKey, Add-AzKeyVaultManagedStorageAccount…}
Script     6.0.0                 Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
Script     1.9.0                 Az.ServiceBus                       {Add-AzServiceBusIPRule, Add-AzServiceBusVirtualNetworkRule, Complete-AzServiceBusMigration, Get-AzServiceBusAuthorizationRule…}

Error output

Resolve-AzError

   HistoryId: 54

Message        : NoRegisteredProviderFound : No registered resource provider found for location 'uksouth' and API version '2015-01-01' for type 'namespaces'. The supported api-versions are '2014-09-01, 2015-08-01, 2017-04-01, 2018-01-01-preview,
                 2021-01-01-preview, 2021-06-01-preview, 2021-11-01, 2022-01-01-preview'. The supported locations are 'australiaeast, australiasoutheast, centralus, eastus, eastus2, westus2, westus, northcentralus, southcentralus, westcentralus, eastasia,
                 southeastasia, brazilsouth, japaneast, japanwest, northeurope, westeurope, centralindia, southindia, westindia, canadacentral, canadaeast, ukwest, uksouth, koreacentral, koreasouth, francecentral, southafricanorth, uaenorth, australiacentral,
                 switzerlandnorth, germanywestcentral, norwayeast, jioindiawest, westus3, swedencentral'.
                 CorrelationId: a6a1bc8f-ea38-4ffe-9173-c21ba717c127
StackTrace     :    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.SendRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.SendRequestAsync(HttpMethod httpMethod, Uri requestUri, CancellationToken cancellationToken)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.SendRequestAsync[TResponseType](HttpMethod httpMethod, Uri requestUri, CancellationToken cancellationToken)
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceLockCmdlet.ListResourcesTypeCollection()
                    at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceLockCmdlet.GetResources()
Exception      : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses.ErrorResponseMessageException
InvocationInfo : {Get-AzResourceLock}
Line           : Get-AzResourceLock -Scope '/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ServiceBus/namespaces/xxx/providers/Microsoft.Auth
                 orization/roleAssignments/xxx'
Position       : At line:1 char:1
                 + Get-AzResourceLock -Scope '/subscriptions/xxx …
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 54
@hbuckle hbuckle added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jun 23, 2022
@ghost ghost added customer-reported and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Jun 23, 2022
azure-sdk pushed a commit to azure-sdk/azure-powershell that referenced this issue Jun 24, 2022
Web ant97 2022 03 01 (Azure#19430)

* Adds base for updating Microsoft.Web from version stable/2021-03-01 to version 2022-03-01

* Updates readme

* Updates API version in new specs and examples

* Carry fwd Microsoft.CertificateRegistration and Microsoft.DomainRegis… (Azure#18460)

* Carry fwd Microsoft.CertificateRegistration and Microsoft.DomainRegistration RPs to Api-version 2022-03-01

* Add x-ms-enum for array of inline enums. Fix reference to older api version for common defs

* Add examples for App Service Certificate orders

* Add suppressions back

* Add examples for Microsoft.DomainRegistration RP

* Fixes from prettier

* Remove unused example

* Add Unhealthy CustomDomainStatus for StaticSites (Azure#18557)

* Adding VnetRouteAllEnabled, VnetImagePullEnabled, VnetContentShareEnabled site properties to CommonDefinitions (Azure#18627)

* Added vnet realted site properties to common definitions

* removed tab

Co-authored-by: Tanay Bhartia <tanaybhartia@microsoft.com>

* Add Ftp/Remote debug properties to Ase network config (Azure#18549)

* Add Ftp/Remote debug properties to Ase network config

* Switched changes to the right file

* Add Networking config to hosting environment creates

* Added some of the missing examples

* Remove disallowed properties from example Ase GET response

* Adjusted responses from other gets

* Added a bunch more examples

* Added other missing examples for Ase.

* Added more missing examples for Ase.

* fixed formatting

* Edit some examples, add back privatelink apis and try to supress the errors for missing examples.

* Fix suppress spelling and fix prettier

* Added missing privatelink examples since suppressing did not work

* Add Bring your own Backend operations (Azure#18517)

* add bring your own backend operations

* add missing files

* fix json formattin

* validation fixes

* fix

* fix more validation

* fix ids

* fix model validation

* fix descriptions

* fix environmentName description

* change to 202

* revert change to 202

* customhostnamesites optional param for 2022 API version (Azure#18670)

* fix DUPLICATE_PARAMETER

* prettier

* fix  OBJECT_ADDITIONAL_PROPERTIES

* fix random sub in examples

* add optional hostname param to customHostnameSites RT and add examples

* move changes from 2021 api version to 2022

* move examples to 2022

* Revert "add optional hostname param to customHostnameSites RT and add examples"

This reverts commit 7fc318e190de2108222dbb869d9a6219a02cae2f.

* remove examples from 2021

* fix lintDiff

* prettier fix

* model validation fix

* suppress model validation in readme

Co-authored-by: Elle Tojaroon <patojaro@microsoft.com>

* [Microsoft.Web] Add CustomDnsSuffixConfiguration to ASE (Azure#18553)

* [Microsoft.Web] Add CustomDnsSuffixConfiguration to AppServiceEnvironments

* Add examples

* Fix style issues

* Add customdnssuffix to custom-words

* Add CustomDnsSuffixConfiguration to AppServiceEnvironment definition

* Address remaining model validation errors

* Adjusted networking configuration definitions

* Addressed Arm review feedback

Co-authored-by: Jarod Aerts <jarodaerts@microsoft.com>

* Fork/web ant97 2022 03 01 (Azure#19259)

* Added DeploymentStatus API specs and examples

* change status to enum, rm extra dot

* suppress missing examples for now

* rm id from List Deployment Slot examples

* rm location, and rename deploymentId in GetSiteDeploymentStatus examples

* change model as string to true, add 202 operations for DeploymentStatus ops to spec

* rename operationId to deploymentStatusId, undo deploymentId rename

* add long running op, as per linter

Co-authored-by: Shubham Dhond <shdhond@microsoft.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>

* PublicNetworkAccess Swagger Change (Azure#19352)

* add publicNetworkAccess property in site for swagger

* add suppression to fix Model Validation CI

* Add allowed values in the description

* Add specs for Hosting Environment Maintenance Control (Azure#18691)

* Add documentation for Hosting Environment Maintenance Control

* Update example file name

* Make UpgradePreference non-nullable

* Correct indentation to 2 spaces

* Fix upgradePreference indentation

* Address swagger feedback. Add enums with descriptions.

* Move testNotification to request body. Update description text

* Fix testNotification

* Fix example

* Replace TestNotification parameter with TestUpgradeNotification API

* Rename to TestUpgradeAvailableNotification

* Added logic apps operations (Azure#18604)

* Added Initial Operations and some definitions

* Adding additional objects to support Logic Apps operations

* Updated path and parameters to match testing

* Prettier Fixes

* oav validat-example fixes

* Github validation fixes

* Prettier

* Updated examples and paths

* Prettier

* Revert "Prettier"

This reverts commit da090adf8005e0bd6fdc2ddebbd4390e5c4b6b20.

* Prettier

* Fixed model validation errors

* Filled in nextLinkName values

* Fixing swagger lintdiff errors

* added x-ms-long-running to async calls

* Adds numberOfWorkers to app service plan (Azure#19475)

* Adds numberOfWorkers to app service plan

* Add suppression for missing ASP examples

* Updating to fix workflow errors (Azure#19490)

* Removed conflicting resource definition and added reference to CommonDefinitions.json (Azure#19507)

* Removed conflicting resource definition and added reference to CommonDefinitions.json

* Updated resource to have workflow version

* Updated nextLink object to be correctly tagged (Azure#19560)

* Updated nextLink object to be correctly tagged

* Adding value placeholder

* Updated SKU to remove conflict

* Updated x-ms-enum

* Added missing model

* Adding more missing models

* Add suppressions for missing examples (#19563)

Co-authored-by: Joseph Lin <54335291+joslinmicrosoft@users.noreply.github.com>
Co-authored-by: Tanay Bhartia <tanaybhartia@gmail.com>
Co-authored-by: Tanay Bhartia <tanaybhartia@microsoft.com>
Co-authored-by: JarodAertsMs <90280240+JarodAertsMs@users.noreply.github.com>
Co-authored-by: annikel <92825476+annikel@users.noreply.github.com>
Co-authored-by: Paviya (Elle) Tojaroon <pt335@cornell.edu>
Co-authored-by: Elle Tojaroon <patojaro@microsoft.com>
Co-authored-by: Chris Chen <chrc@microsoft.com>
Co-authored-by: Jarod Aerts <jarodaerts@microsoft.com>
Co-authored-by: edwin-msft <71858592+edwin-msft@users.noreply.github.com>
Co-authored-by: Shubham Dhond <shdhond@microsoft.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
Co-authored-by: jiansong-msft <77516279+jiansong-msft@users.noreply.github.com>
Co-authored-by: Derek Johnson <47129225+dejo-msft@users.noreply.github.com>
Co-authored-by: Alex Karcher <alkarche@microsoft.com>
@dingmeng-xue dingmeng-xue added ARM - Core CXP Attention [Deprecated] The Azure CXP Support Team is responsible for this issue. labels Jun 26, 2022
@ghost
Copy link

ghost commented Jun 26, 2022

Thank you for your feedback. This has been routed to the support team for assistance.

@navba-MSFT navba-MSFT self-assigned this Jun 28, 2022
@navba-MSFT
Copy link
Contributor

@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.

@navba-MSFT
Copy link
Contributor

@hbuckle Could you please run the below command in order and check if that helps? Awaiting your reply.

$auth=Get-AzAccessToken
$authHeader= $auth.token
Invoke-WebRequest -UseBasicParsing https://management.azure.com/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ServiceBus/namespaces/xxx/providers/Microsoft.Authorization/roleAssignments/xxx/providers/Microsoft.Authorization/locks?api-version=2022-01-01-preview -Method GET -Headers @{"Authorization"="Bearer $authHeader"}

@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Jun 28, 2022
navba-MSFT added a commit to navba-MSFT/azure-powershell that referenced this issue Jun 28, 2022
@hbuckle
Copy link
Author

hbuckle commented Jun 30, 2022

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

uuid:24053f78-6d20-4b32-aa3c-5b2705f597ab;id=1511182022-06-30T09:12:47ZNo HTTP resource was found that matches the request URI
     | 'https://sbgm.windows.net/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ServiceBus/namespaces/xxx/providers/Microsoft.Authorization/roleAssignments/xxx/providers/Microsoft.Authorization/locks?api-version=2022-01-01-preview'.

The third one (without the roleassignments) works correctly

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Jun 30, 2022
@navba-MSFT
Copy link
Contributor

@hbuckle Thanks for the update. The above PR is also merged now to use the version'2017-04-01' for the locks.
Did you also test using the az lock list CLI command or az lock show CLI command and check if that works ?

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM - Core bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported CXP Attention [Deprecated] The Azure CXP Support Team is responsible for this issue. needs-author-feedback More information is needed from author to address the issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants