Azure / Azure/azure-powershell

Get-AzP2sVpnGatewayDetailedConnectionHealth fails with Index error

Open
#12,964 8 comments 0 reactions 0 assignees View on GitHub
act-quality-productivity-squad customer-reported needs-team-attention needs-team-triage Network - VPN Gateway question Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

## Description
When running the `Get-AzP2sVpnGatewayDetailedConnectionHealth` cmdlet to retrieve the detailed connection settings as per the [documentation](https://docs.microsoft.com/en-us/powershell/module/az.network/get-azp2svpngatewaydetailedconnectionhealth?view=azps-4.6.1#examples), the cmdlet fails with

`Get-AzP2sVpnGatewayDetailedConnectionHealth: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.`

## Steps to reproduce

```powershell
$now = Get-Date
$context = New-AzStorageContext -StorageAccountName storage-account -UseConnectedAccount
$blobSasUrl = New-AzStorageBlobSASToken -Container contp2stesting -Blob emptyfile.txt -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri
Get-AzP2sVpnGatewayDetailedConnectionHealth -Name vwan-gw-name -ResourceGroupName vwan-rg-name -OutputBlobSasUrl $blobSasUrl
```

## Environment data

```
Name Value
---- -----
PSVersion 7.0.3
PSEdition Core
GitCommitId 7.0.3
OS Darwin 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153…
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

## Module versions

```powershell
Directory: ~/.local/share/powershell/Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 4.6.1 Az Core,Desk
Script 3.7.0 Az Core,Desk
Script 1.9.3 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzCo…
Script 1.7.5 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzCo…
Script 1.1.1 Az.Advisor Core,Desk {Get-AzAdvisorRecommendation, Enable-Az…
Script 1.2.0 Az.Aks Core,Desk {Get-AzAksCluster, New-AzAksCluster, Re…
Script 1.0.3 Az.Aks Core,Desk {Get-AzAks, New-AzAks, Remove-AzAks, Im…
Script 1.1.4 Az.AnalysisServices Core,Desk {Resume-AzAnalysisServicesServer, Suspe…
Script 1.1.2 Az.AnalysisServices Core,Desk {Resume-AzAnalysisServicesServer, Suspe…
Script 2.1.0 Az.ApiManagement Core,Desk {Add-AzApiManagementApiToGateway, Add-A…
Script 1.4.0 Az.ApiManagement Core,Desk {Add-AzApiManagementApiToProduct, Add-A…
Script 1.1.0 Az.ApplicationInsights Core,Desk {Get-AzApplicationInsights, New-AzAppli…
Script 1.0.3 Az.ApplicationInsights Core,Desk {Get-AzApplicationInsights, New-AzAppli…
Script 1.4.0 Az.Automation Core,Desk {Get-AzAutomationHybridWorkerGroup, Rem…
Script 1.3.6 Az.Automation Core,Desk {Get-AzAutomationHybridWorkerGroup, Rem…
Script 3.1.0 Az.Batch Core,Desk {Remove-AzBatchAccount, Get-AzBatchAcco…
Script 2.0.2 Az.Batch Core,Desk {Remove-AzBatchAccount, Get-AzBatchAcco…
Script 1.0.3 Az.Billing Core,Desk {Get-AzBillingInvoice, Get-AzBillingPer…
Script 1.0.2 Az.Billing Core,Desk {Get-AzBillingInvoice, Get-AzBillingPer…
Script 1.4.3 Az.Cdn Core,Desk {Get-AzCdnProfile, Get-AzCdnProfileSsoU…
Script 1.4.2 Az.Cdn Core,Desk {Get-AzCdnProfile, Get-AzCdnProfileSsoU…
Script 1.5.1 Az.CognitiveServices Core,Desk {Get-AzCognitiveServicesAccount, Get-Az…
Script 1.2.3 Az.CognitiveServices Core,Desk {Get-AzCognitiveServicesAccount, Get-Az…
Script 4.3.1 Az.Compute Core,Desk {Remove-AzAvailabilitySet, Get-AzAvaila…
Script 3.6.0 Az.Compute Core,Desk {Remove-AzAvailabilitySet, Get-AzAvaila…
Script 1.0.3 Az.ContainerInstance Core,Desk {New-AzContainerGroup, Get-AzContainerG…
Script 1.1.1 Az.ContainerRegistry Core,Desk {New-AzContainerRegistry, Get-AzContain…
Script 1.1.0 Az.DataBoxEdge Core,Desk {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdg…
Script 1.10.0 Az.DataFactory Core,Desk {Set-AzDataFactoryV2, Update-AzDataFact…
Script 1.7.0 Az.DataFactory Core,Desk {Set-AzDataFactoryV2, Update-AzDataFact…
Script 1.0.2 Az.DataLakeAnalytics Core,Desk {Get-AzDataLakeAnalyticsDataSource, New…
Script 1.2.8 Az.DataLakeStore Core,Desk {Get-AzDataLakeStoreTrustedIdProvider, …
Script 1.0.0 Az.DataShare Core,Desk {New-AzDataShareAccount, Get-AzDataShar…
Script 1.1.0 Az.DeploymentManager Core,Desk {Get-AzDeploymentManagerArtifactSource,…
Script 1.0.0 Az.DesktopVirtualization Core,Desk {Disconnect-AzWvdUserSession, Get-AzWvd…
Script 1.0.2 Az.DevTestLabs Core,Desk {Get-AzDtlAllowedVMSizesPolicy, Get-AzD…
Script 1.1.2 Az.Dns Core,Desk {Get-AzDnsRecordSet, New-AzDnsRecordCon…
Script 1.3.0 Az.EventGrid Core,Desk {New-AzEventGridTopic, Get-AzEventGridT…
Script 1.2.3 Az.EventGrid Core,Desk {New-AzEventGridTopic, Get-AzEventGridT…
Script 1.5.0 Az.EventHub Core,Desk {New-AzEventHubNamespace, Get-AzEventHu…
Script 1.4.3 Az.EventHub Core,Desk {New-AzEventHubNamespace, Get-AzEventHu…
Script 1.6.1 Az.FrontDoor Core,Desk {New-AzFrontDoor, Get-AzFrontDoor, Set-…
Script 1.4.0 Az.FrontDoor Core,Desk {New-AzFrontDoor, Get-AzFrontDoor, Set-…
Script 1.0.1 Az.Functions Core,Desk {Get-AzFunctionApp, Get-AzFunctionAppAv…
Script 3.5.0 Az.HDInsight Core,Desk {Get-AzHDInsightJob, New-AzHDInsightSqo…
Script 3.1.0 Az.HDInsight Core,Desk {Get-AzHDInsightJob, New-AzHDInsightSqo…
Script 1.1.0 Az.HealthcareApis Core,Desk {New-AzHealthcareApisService, Remove-Az…
Script 1.0.1 Az.HealthcareApis Core,Desk {New-AzHealthcareApisService, Remove-Az…
Script 2.5.0 Az.IotHub Core,Desk {Add-AzIotHubKey, Get-AzIotHubEventHubC…
Script 2.3.0 Az.IotHub Core,Desk {Add-AzIotHubKey, Get-AzIotHubEventHubC…
Script 2.1.0 Az.KeyVault Core,Desk {Add-AzKeyVaultCertificate, Update-AzKe…
Script 1.5.2 Az.KeyVault Core,Desk {Add-AzKeyVaultCertificate, Update-AzKe…
Script 1.3.2 Az.LogicApp Core,Desk {Get-AzIntegrationAccountAgreement, Get…
Script 1.1.3 Az.MachineLearning Core,Desk {Move-AzMlCommitmentAssociation, Get-Az…
Script 1.1.0 Az.Maintenance Core,Desk {Get-AzApplyUpdate, Get-AzConfiguration…
Script 1.1.0 Az.ManagedServices Core,Desk {Get-AzManagedServicesAssignment, New-A…
Script 1.0.2 Az.ManagedServices Core,Desk {Get-AzManagedServicesAssignment, New-A…
Script 1.0.2 Az.MarketplaceOrdering Core,Desk {Get-AzMarketplaceTerms, Set-AzMarketpl…
Script 1.1.1 Az.Media Core,Desk {Sync-AzMediaServiceStorageKey, Set-AzM…
Script 2.1.0 Az.Monitor Core,Desk {Get-AzMetricDefinition, Get-AzMetric, …
Script 1.6.2 Az.Monitor Core,Desk {Get-AzMetricDefinition, Get-AzMetric, …
Script 3.3.0 Az.Network Core,Desk {Add-AzApplicationGatewayAuthentication…
Script 2.4.0 Az.Network Core,Desk {Add-AzApplicationGatewayAuthentication…
Script 1.1.1 Az.NotificationHubs Core,Desk {Get-AzNotificationHub, Get-AzNotificat…
Script 2.3.0 Az.OperationalInsights Core,Desk {New-AzOperationalInsightsAzureActivity…
Script 1.3.4 Az.OperationalInsights Core,Desk {New-AzOperationalInsightsAzureActivity…
Script 1.3.1 Az.PolicyInsights Core,Desk {Get-AzPolicyEvent, Get-AzPolicyState, …
Script 1.2.1 Az.PolicyInsights Core,Desk {Get-AzPolicyEvent, Get-AzPolicyState, …
Script 1.1.2 Az.PowerBIEmbedded Core,Desk {Remove-AzPowerBIWorkspaceCollection, G…
Script 1.1.1 Az.PowerBIEmbedded Core,Desk {Remove-AzPowerBIWorkspaceCollection, G…
Script 1.0.3 Az.PrivateDns Core,Desk {Get-AzPrivateDnsZone, Remove-AzPrivate…
Script 1.0.2 Az.PrivateDns Core,Desk {Get-AzPrivateDnsZone, Remove-AzPrivate…
Script 2.12.0 Az.RecoveryServices Core,Desk {Get-AzRecoveryServicesBackupProperty, …
Script 2.11.1 Az.RecoveryServices Core,Desk {Get-AzRecoveryServicesBackupProperty, …
Script 2.8.0 Az.RecoveryServices Core,Desk {Get-AzRecoveryServicesBackupProperty, …
Script 1.2.1 Az.RedisCache Core,Desk {Remove-AzRedisCachePatchSchedule, New-…
Script 1.0.3 Az.Relay Core,Desk {New-AzRelayNamespace, Get-AzRelayNames…
Script 2.5.0 Az.Resources Core,Desk {Get-AzProviderOperation, Remove-AzRole…
Script 1.13.0 Az.Resources Core,Desk {Get-AzProviderOperation, Remove-AzRole…
Script 1.4.1 Az.ServiceBus Core,Desk {New-AzServiceBusNamespace, Get-AzServi…
Script 2.1.0 Az.ServiceFabric Core,Desk {Add-AzServiceFabricClientCertificate, …
Script 2.0.1 Az.ServiceFabric Core,Desk {Add-AzServiceFabricClientCertificate, …
Script 1.2.0 Az.SignalR Core,Desk {New-AzSignalR, Get-AzSignalR, Get-AzSi…
Script 1.1.1 Az.SignalR Core,Desk {New-AzSignalR, Get-AzSignalR, Get-AzSi…
Script 2.9.1 Az.Sql Core,Desk {Get-AzSqlDatabaseTransparentDataEncryp…
Script 2.5.0 Az.Sql Core,Desk {Get-AzSqlDatabaseTransparentDataEncryp…
Script 1.1.0 Az.SqlVirtualMachine Core,Desk {New-AzSqlVM, Get-AzSqlVM, Update-AzSql…
Script 2.5.0 Az.Storage Core,Desk {Get-AzStorageAccount, Get-AzStorageAcc…
Script 1.13.0 Az.Storage Core,Desk {Get-AzStorageAccount, Get-AzStorageAcc…
Script 1.3.0 Az.StorageSync Core,Desk {Invoke-AzStorageSyncCompatibilityCheck…
Script 1.2.3 Az.StorageSync Core,Desk {Invoke-AzStorageSyncCompatibilityCheck…
Script 1.0.1 Az.StreamAnalytics Core,Desk {Get-AzStreamAnalyticsFunction, Get-AzS…
Script 1.0.0 Az.Support Core,Desk {Get-AzSupportService, Get-AzSupportPro…
Script 1.0.4 Az.TrafficManager Core,Desk {Add-AzTrafficManagerCustomHeaderToEndp…
Script 1.0.3 Az.TrafficManager Core,Desk {Add-AzTrafficManagerCustomHeaderToEndp…
Script 1.11.0 Az.Websites Core,Desk {Get-AzAppServicePlan, Set-AzAppService…
Script 1.8.0 Az.Websites Core,Desk {Get-AzAppServicePlan, Set-AzAppService…
Script 0.1.599.7 AzureAD.Standard.Preview Desk {Remove-AzureADDeviceRegisteredOwner, R…

Directory: /usr/local/microsoft/powershell/7/Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Manifest 1.2.5 Microsoft.PowerShell.Archive Desk {Compress-Archive, Expand-Archive}
Manifest 7.0.0.0 Microsoft.PowerShell.Host Core {Start-Transcript, Stop-Transcript}
Manifest 7.0.0.0 Microsoft.PowerShell.Management Core {Add-Content, Clear-Content, Clear-Item…
Manifest 7.0.0.0 Microsoft.PowerShell.Security Core {Get-Credential, Get-ExecutionPolicy, S…
Manifest 7.0.0.0 Microsoft.PowerShell.Utility Core {Export-Alias, Get-Alias, Import-Alias,…
Script 1.4.7 PackageManagement Desk {Find-Package, Get-Package, Get-Package…
Script 2.2.4.1 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-M…
Script 2.0.5 PSDesiredStateConfiguration Core {Configuration, New-DscChecksum, Get-Ds…
Script 2.0.2 PSReadLine Desk {Get-PSReadLineKeyHandler, Set-PSReadLi…
Binary 2.0.3 ThreadJob Desk Start-ThreadJob
```

## Debug output

```
DEBUG: 3:41:26 pm - GetAzureRmP2SVpnGatewayDetailedConnectionHealthCommand begin processing with ParameterSet 'ByP2SVpnGatewayName'.
DEBUG: 3:41:26 pm - using account id 'user@example.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'user@example.com', environment: 'AzureCloud', tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', Endpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6954640Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6955000Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: ADAL PCL.CoreCLR with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6955240Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: === Token Acquisition started:
CacheType: null
Authentication Target: User
, Authority Host: login.microsoftonline.com

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6955330Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: === Token Acquisition started:
Authority: https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: null
Authentication Target: User

DEBUG: [ADAL]: Verbose: 2020-09-15T05:41:26.6956510Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: Loading from cache.

DEBUG: [ADAL]: Verbose: 2020-09-15T05:41:26.6956600Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: Loading from cache.

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6975860Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 9 items to token cache.

DEBUG: [ADAL]: Verbose: 2020-09-15T05:41:26.6977130Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Verbose: 2020-09-15T05:41:26.6977450Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6978910Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: An item matching the requested resource was found in the cache

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6979060Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: An item matching the requested resource was found in the cache

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6980110Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: 52.4141669 minutes left until token in cache expires

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6980220Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: 52.4141669 minutes left until token in cache expires

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6980650Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6980770Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6982310Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 15/9/2020 6:33:51 am +00:00

DEBUG: [ADAL]: Information: 2020-09-15T05:41:26.6982440Z: f9b25de8-c792-43f7-b448-2863c3e31a46 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 15/9/2020 6:33:51 am +00:00Access Token Hash: mk0i0GxXazIuJtZG7yN28bFAT9f4FGbcpczmBPvk50w=
User id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:51 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:51 +00:00' Comparing to '09/15/2020 05:41:26 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:52:24.8481880'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/vwan-rg-name/providers/Microsoft.Network/p2svpnGateways/vwan-gw-name?api-version=2019-12-01

Headers:
x-ms-client-request-id : 166f134e-f126-461b-8294-fc240da77c38
Accept-Language : en-US

Body:

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

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
ETag : W/"1a8d58d0-0b34-48ad-b7a1-afa4d2d2cd4d"
x-ms-request-id : 562c76d3-3751-405c-9d16-68b4627b8b6a
x-ms-correlation-request-id : f1b23cde-073f-4070-b95d-864aacc856fd
x-ms-arm-service-request-id : 5b58997a-886a-42f9-bff9-56812016acbe
Strict-Transport-Security : max-age=31536000; includeSubDomains
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11992
x-ms-routing-request-id : AUSTRALIASOUTHEAST:20200915T054127Z:f1b23cde-073f-4070-b95d-864aacc856fd
X-Content-Type-Options : nosniff
Date : Tue, 15 Sep 2020 05:41:27 GMT

Body:
{
"name": "vwan-gw-name",
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/vwan-rg-name/providers/Microsoft.Network/p2sVpnGateways/vwan-gw-name",
"etag": "W/\"1a8d58d0-0b34-48ad-b7a1-afa4d2d2cd4d\"",
"type": "Microsoft.Network/p2sVpnGateways",
"location": "australiasoutheast",
"properties": {
"provisioningState": "Succeeded",
"virtualHub": {
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/vwan-rg-name/providers/Microsoft.Network/virtualHubs/AustraliaSoutheast"
},
"vpnServerConfiguration": {
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/vwan-rg-name/providers/Microsoft.Network/vpnServerConfigurations/AzureAD-Authentication"
},
"vpnServerConfigurationLocation": "australiasoutheast",
"p2SConnectionConfigurations": [
{
"name": "P2SConnectionConfigDefault",
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/vwan-rg-name/providers/Microsoft.Network/p2sVpnGateways/vwan-gw-name/p2sConnectionConfigurations/P2SConnectionConfigDefault",
"etag": "W/\"1a8d58d0-0b34-48ad-b7a1-afa4d2d2cd4d\"",
"type": "Microsoft.Network/p2sVpnGateways/p2sConnectionConfigurations",
"properties": {
"provisioningState": "Succeeded",
"vpnClientAddressPool": {
"addressPrefixes": [
"172.25.248.0/21"
]
}
}
}
],
"vpnGatewayScaleUnit": 1
}
}

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:51 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:51 +00:00' Comparing to '09/15/2020 05:41:27 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:52:24.0906350'
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:51 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:51 +00:00' Comparing to '09/15/2020 05:41:27 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:52:23.6349420'
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:55 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:55 +00:00' Comparing to '09/15/2020 05:41:56 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:51:58.9741160'
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:51 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:51 +00:00' Comparing to '09/15/2020 05:41:58 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:51:53.5257120'
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:51 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:51 +00:00' Comparing to '09/15/2020 05:42:49 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:51:02.4610450'
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:55 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:55 +00:00' Comparing to '09/15/2020 05:42:56 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:50:58.9685220'
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:51 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:51 +00:00' Comparing to '09/15/2020 05:43:40 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:50:11.2498300'
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:55 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:55 +00:00' Comparing to '09/15/2020 05:43:56 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:49:58.9656510'
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '09/15/2020 06:33:51 +00:00', MultipleResource? 'True', Tenant: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', UserId: 'user@example.com'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'user@example.com', Name: user , IdProvider: 'https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/', Uid: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '09/15/2020 06:33:51 +00:00' Comparing to '09/15/2020 05:44:30 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:49:20.9258870'
Get-AzP2sVpnGatewayDetailedConnectionHealth: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
DEBUG: AzureQoSEvent: CommandName - Get-AzP2sVpnGatewayDetailedConnectionHealth; IsSuccess - False; Duration - 00:03:24.7483664;; Exception - System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object arg0, Object arg1)
at Microsoft.Azure.Commands.Network.NetworkClient.ExecuteOperationWithHttpMessagesAsync(String resourceGroupName, String resourceName, Object parameters, String apiUrl, String apiVersion, Dictionary`2 customHeaders, CancellationToken cancellationToken)
at Microsoft.Azure.Commands.Network.NetworkClient.GetP2SVpnGatewayDetailedConnectionHealthAsync(String resourceGroupName, String p2sVpnGatewayName, P2SVpnConnectionHealthRequest parameters, CancellationToken cancellationToken)
at Microsoft.Azure.Commands.Network.NetworkClient.GetP2SVpnGatewayDetailedConnectionHealth(String resourceGroupName, String p2sVpnGatewayName, P2SVpnConnectionHealthRequest parameters)
at Microsoft.Azure.Commands.Network.GetAzureRmP2SVpnGatewayDetailedConnectionHealthCommand.Execute()
at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.b__3_0(T c)
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet, Action`1 executor)
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T cmdlet)
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 3:44:51 pm - GetAzureRmP2SVpnGatewayDetailedConnectionHealthCommand end processing.
```

## Error output

```
Message : Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
StackTrace : at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format,
ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.Format(String format, Object arg0, Object arg1)
at Microsoft.Azure.Commands.Network.NetworkClient.ExecuteOperationWithHttpMessagesAsync(String
resourceGroupName, String resourceName, Object parameters, String apiUrl, String apiVersion,
Dictionary`2 customHeaders, CancellationToken cancellationToken)
at
Microsoft.Azure.Commands.Network.NetworkClient.GetP2SVpnGatewayDetailedConnectionHealthAsync(String
resourceGroupName, String p2sVpnGatewayName, P2SVpnConnectionHealthRequest parameters,
CancellationToken cancellationToken)
at Microsoft.Azure.Commands.Network.NetworkClient.GetP2SVpnGatewayDetailedConnectionHealth(String
resourceGroupName, String p2sVpnGatewayName, P2SVpnConnectionHealthRequest parameters)
at
Microsoft.Azure.Commands.Network.GetAzureRmP2SVpnGatewayDetailedConnectionHealthCommand.Execute()
at Microsoft.Azure.Commands.Network.NetworkBaseCmdlet.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.<>c__3`1.b__3_0(T c)
at
Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T
cmdlet, Action`1 executor)
at
Microsoft.WindowsAzure.Commands.Utilities.Common.CmdletExtensions.ExecuteSynchronouslyOrAsJob[T](T
cmdlet)
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.FormatException
InvocationInfo : {Get-AzP2sVpnGatewayDetailedConnectionHealth}
Line : Get-AzP2sVpnGatewayDetailedConnectionHealth -ResourceGroupName vwan-rg-name -Name
vwan-gw-name -OutputBlobSasUrl $blobSasUrl
Position : At line:1 char:1
+ Get-AzP2sVpnGatewayDetailedConnectionHealth -ResourceGroupName ase-pr …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 20
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the command from the issue with the listed Az.Network and PowerShell versions, then trace the Get-AzP2sVpnGatewayDetailedConnectionHealth entry point. The work is done when the cmdlet retrieves detailed connection health without the Index error; add or update a regression test if the surrounding implementation provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.