Azure / Azure/azure-powershell

AZ Datafactories Powershell module is using incorrect RP URI

Open
#22,849 3 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad bug customer-reported Data Factory Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### 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](https://github.com/Azure/azure-powershell/assets/7443092/0dadda3f-168a-462f-8549-3d94d6962fa9)

### Issue script & Debug output

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

### Environment data

```PowerShell
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

```PowerShell
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

```PowerShell
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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.