Azure / Azure/azure-powershell

Get-AzureRmVirtualNetworkGatewayAdvertisedRoute responds with empty body

Open
#4,714 7 comments 0 reactions 1 assignee Claimed by @Nilambari View on GitHub
act-quality-productivity-squad customer-reported Network - VPN Gateway Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Cmdlet(s)
Get-AzureRmVirtualNetworkGatewayAdvertisedRoute

### PowerShell Version
```
Name Value
---- -----
PSVersion 5.1.15063.608
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.608
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

### Module Version
```
Version : 4.4.0
Name : Azure
Author : Microsoft Corporation
PowerShellVersion : 3.0
```

### Description
Cmdlet `Get-AzureRmVirtualNetworkGatewayAdvertisedRoute` worked in Azure PS v4.3.1, but no longer works in Azure PS v4.4.0.

I ran it in 4.3.1, upgraded to 4.4.0, and instantly ran it again, and it responds with an empty body.

### Debug Output
Instructions: to get Debug Output, set `$DebugPreference="Continue"` and then execute the cmdlet or script causing the issue
```
PS C:\windows\system32> Get-AzureRmVirtualNetworkGatewayAdvertisedRoute -Peer 10.1.1.1 -ResourceGroupName ryanb-RG01 -VirtualNetworkGatewayName ryanb-GW01 -Debug
DEBUG: 11:03:41 AM - GetVirtualNetworkGatewayAdvertisedRouteCommand begin processing with ParameterSet '__AllParameterSets'.

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A
DEBUG: 11:03:43 AM - using account id 'redacted@url.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'redacted@url.com', environment: 'AzureCloud', tenant: '[redacted]'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: d6c4bae7-8efc-4f9f-a452-ba49d654732f - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
Resource: https://management.core.windows.net/
ClientId: [clientID]
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/04/2017 16:03:44: d6c4bae7-8efc-4f9f-a452-ba49d654732f - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: d6c4bae7-8efc-4f9f-a452-ba49d654732f - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/04/2017 16:03:44: d6c4bae7-8efc-4f9f-a452-ba49d654732f - TokenCache: 56.069868565 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: d6c4bae7-8efc-4f9f-a452-ba49d654732f - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: d6c4bae7-8efc-4f9f-a452-ba49d654732f - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: NyKVTugkebr2a8L6nfEcLGFtML8crhoHQ5H0MLjQ96w=
Refresh Token Hash: GLD9jpwTNerzsx5cjwjrdhb4NlYxcJJSm5pOe+tt+XE=
Expiration Time: 10/04/2017 16:59:48 +00:00
User Hash: 3bj8hAIttIW0kb7fds2N7arvBmWztUSfuOM7q+AGlaQ=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: - TokenCache: Serializing token cache with 2 items.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: 7e0b288a-a1ec-409f-b1f4-c7b60c50d042 - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
Resource: https://management.core.windows.net/
ClientId: [clientID]
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/04/2017 16:03:44: 7e0b288a-a1ec-409f-b1f4-c7b60c50d042 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: 7e0b288a-a1ec-409f-b1f4-c7b60c50d042 - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/04/2017 16:03:44: 7e0b288a-a1ec-409f-b1f4-c7b60c50d042 - TokenCache: 56.06984338 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: 7e0b288a-a1ec-409f-b1f4-c7b60c50d042 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: 7e0b288a-a1ec-409f-b1f4-c7b60c50d042 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: NyKVTugkebr2a8L6nfEcLGFtML8crhoHQ5H0MLjQ96w=
Refresh Token Hash: GLD9jpwTNerzsx5cjwjrdhb4NlYxcJJSm5pOe+tt+XE=
Expiration Time: 10/04/2017 16:59:48 +00:00
User Hash: 3bj8hAIttIW0kb7fds2N7arvBmWztUSfuOM7q+AGlaQ=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:44: - TokenCache: Serializing token cache with 2 items.
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/[subID]/resourceGroups/ryanb-RG01/providers/Microsoft.Network/virtualNetworkGateways/ryanb-GW01/getAdvertisedRoutes?peer=10.1.1.1&api-version=2017-09-01

Headers:
x-ms-client-request-id : eb138af0-19e7-4641-b6e7-abd8ecd1ca14
accept-language : en-US

Body:

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

Status Code:
Accepted

Headers:
Pragma : no-cache
Retry-After : 10
x-ms-request-id : 38ae5312-8658-44ad-895d-edb40524f590
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Location : https://management.azure.com/subscriptions/[subID]/providers/Microsoft.Network/locations/northcentralus/operationResults/38ae5312-8658-44ad-895d-edb40524f590?api-version=2017-09-01
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id : ca2bc7d2-0b46-4cbc-9372-909812e94171
x-ms-routing-request-id : WESTUS2:20171004T160345Z:ca2bc7d2-0b46-4cbc-9372-909812e94171
Date : Wed, 04 Oct 2017 16:03:45 GMT

Body:
null

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:55: 0067e55d-972a-4e44-bcda-a3b34d83a991 - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
Resource: https://management.core.windows.net/
ClientId: [clientID]
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/04/2017 16:03:55: 0067e55d-972a-4e44-bcda-a3b34d83a991 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:55: 0067e55d-972a-4e44-bcda-a3b34d83a991 - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/04/2017 16:03:55: 0067e55d-972a-4e44-bcda-a3b34d83a991 - TokenCache: 55.8893122133333 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:55: 0067e55d-972a-4e44-bcda-a3b34d83a991 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:55: 0067e55d-972a-4e44-bcda-a3b34d83a991 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: NyKVTugkebr2a8L6nfEcLGFtML8crhoHQ5H0MLjQ96w=
Refresh Token Hash: GLD9jpwTNerzsx5cjwjrdhb4NlYxcJJSm5pOe+tt+XE=
Expiration Time: 10/04/2017 16:59:48 +00:00
User Hash: 3bj8hAIttIW0kb7fds2N7arvBmWztUSfuOM7q+AGlaQ=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:03:55: - TokenCache: Serializing token cache with 2 items.
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/[subID]/providers/Microsoft.Network/locations/northcentralus/operationResults/38ae5312-8658-44ad-895d-edb40524f590?api-version=2017-09-01

Headers:

Body:

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

Status Code:
Accepted

Headers:
Pragma : no-cache
Retry-After : 10
x-ms-request-id : 38ae5312-8658-44ad-895d-edb40524f590
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Location : https://management.azure.com/subscriptions/[subID]/providers/Microsoft.Network/locations/northcentralus/operationResults/38ae5312-8658-44ad-895d-edb40524f590?api-version=2017-09-01
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 14999
x-ms-correlation-request-id : 68fa2a57-2be6-4fa2-b8c2-7cd18607e29e
x-ms-routing-request-id : WESTUS2:20171004T160355Z:68fa2a57-2be6-4fa2-b8c2-7cd18607e29e
Date : Wed, 04 Oct 2017 16:03:55 GMT

Body:
null

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:04:05: 3fc1724d-1660-4199-baa3-4638bddf4cfb - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
Resource: https://management.core.windows.net/
ClientId: [clientID]
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/04/2017 16:04:05: 3fc1724d-1660-4199-baa3-4638bddf4cfb - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:04:05: 3fc1724d-1660-4199-baa3-4638bddf4cfb - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/04/2017 16:04:05: 3fc1724d-1660-4199-baa3-4638bddf4cfb - TokenCache: 55.7173375333333 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:04:05: 3fc1724d-1660-4199-baa3-4638bddf4cfb - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:04:05: 3fc1724d-1660-4199-baa3-4638bddf4cfb - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: NyKVTugkebr2a8L6nfEcLGFtML8crhoHQ5H0MLjQ96w=
Refresh Token Hash: GLD9jpwTNerzsx5cjwjrdhb4NlYxcJJSm5pOe+tt+XE=
Expiration Time: 10/04/2017 16:59:48 +00:00
User Hash: 3bj8hAIttIW0kb7fds2N7arvBmWztUSfuOM7q+AGlaQ=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/04/2017 16:04:05: - TokenCache: Serializing token cache with 2 items.
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/[subID]/providers/Microsoft.Network/locations/northcentralus/operationResults/38ae5312-8658-44ad-895d-edb40524f590?api-version=2017-09-01

Headers:

Body:

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

Status Code:
OK

Headers:
Pragma : no-cache
x-ms-request-id : 38ae5312-8658-44ad-895d-edb40524f590
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Location : https://management.azure.com/subscriptions/[subID]/providers/Microsoft.Network/locations/northcentralus/operationResults/38ae5312-8658-44ad-895d-edb40524f590?api-version=2017-09-01
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 14998
x-ms-correlation-request-id : 6a74c00d-2120-4d53-b9f7-adf600e6a2db
x-ms-routing-request-id : WESTUS2:20171004T160406Z:6a74c00d-2120-4d53-b9f7-adf600e6a2db
Date : Wed, 04 Oct 2017 16:04:05 GMT

Body:
{
"value": []
}

DEBUG: AzureQoSEvent: CommandName - Get-AzureRmVirtualNetworkGatewayAdvertisedRoute; IsSuccess - True; Duration - 00:00:24.8002224; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 11:04:07 AM - GetVirtualNetworkGatewayAdvertisedRouteCommand end processing.
DEBUG: 11:04:07 AM - GetVirtualNetworkGatewayAdvertisedRouteCommand end processing.
```

### Script/Steps for Reproduction
Run command. For example: `Get-AzureRmVirtualNetworkGatewayAdvertisedRoute -Peer 10.1.1.1 -ResourceGroupName ryanb-RG01 -VirtualNetworkGatewayName ryanb-GW01`

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.