Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.27k stars 3.87k forks source link

AZ Datafactories Powershell module is using incorrect RP URI #22849

Open susheel-vadde opened 1 year ago

susheel-vadde commented 1 year ago

Description

this command : Get-AzDataFactory -Name "XXXXXXX" -ResourceGroupName "XXXXXXXX" - Debug is making a request with incorrect resource Absolute URI : Absolute Uri: https://management.azure.com/subscriptions/ae0b13d9-e09c-4e54-b1e6-8e777d8fbe14/resourcegroups/ba-n-zeaus-cgcid-rg/providers/Microsoft.DataFactory/**datafactories**/ba-n-zeaus-cgcid-pprd-adf?api-version=2015-10-01

It should actually be
Absolute Uri: https://management.azure.com/subscriptions/xxxxxxxxxx/resourcegroups/XXXXXX-rg/providers/Microsoft.DataFactory/**factories**/xxxxxx-adf?api-version=2015-10-01

image

Issue script & Debug output

Get-AzDataFactory -Name  "XXXXXXX" -ResourceGroupName "XXXXXXXX"  -Debug

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.7
PSEdition                      Core
GitCommitId                    7.3.7
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

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.13.0                Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     1.17.0                Az.DataFactory                      {Add-AzDataFactoryV2DataFlowDebugSessionPackage, Add-AzDataFactoryV2TriggerSubscription, Get-AzDataFactory, Get-AzDataFactoryActivityWindow…}

Error output

RequestId      :
Message        : HTTP Status Code: BadGateway
                 Error Code: InvalidGatewayHost
                 Error Message: Host name resolution failed for 'Microsoft.DataFactory'; cannot fulfill the request.
                 Request Id: 77c62b2a-00d6-49cf-a388-9133ce7c8192
                 Timestamp (Utc):09/22/2023 16:26:11
ServerMessage  :
ServerResponse :
RequestMessage :
InvocationInfo : {Get-AzDataFactory}
Line           : $dataFactory = Get-AzDataFactory -Name  "XXXXXXXXX" -ResourceGroupName "XXXXXXXX" -ErrorAction SilentlyContinue
Position       : At line:1 char:16
                 + … taFactory = Get-AzDataFactory -Name  "XXXXXXXX" -Res …
                 +               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StackTrace     :
HistoryId      : 5
microsoft-github-policy-service[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @zhangyd2015, @Frey-Wang, @Jingshu923.

microsoft-github-policy-service[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @zhangyd2015, @Frey-Wang, @Jingshu923.