I am following the instructions in https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-powershell#grant-access-from-a-virtual-network to allow a VM in my Tenancy access to a storage account in a client tenancy, using Powershell.
When ever I run the following command (in an Azure shell in the context of the client's Azure tenancy):
$subnet = Get-AzVirtualNetwork -ResourceGroupName "client-resource-group" -Name "client-vnet" | Get-AzVirtualNetworkSubnetConfig -Name "/subscriptions/my-subscription/resourceGroups/my-resource-group/providers/Microsoft.Network/virtualNetworks/my-vnet/subnets/my-subnet"
I receive the following error:
Get-AzVirtualNetwork: The api-version '2021-05-01' is invalid. The supported versions are '2021-04-01,2021-01-01,2020-10-01,2020-09-01,2020-08-01,2020-07-01,2020-06-01,2020-05-01,2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,201
9-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-0
1,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
StatusCode: 400
ReasonPhrase: Bad Request
ErrorCode: InvalidApiVersionParameter
ErrorMessage: The api-version '2021-05-01' is invalid. The supported versions are '2021-04-01,2021-01-01,2020-10-01,2020-09-01,2020-08-01,2020-07-01,2020-06-01,2020-05-01,2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,2019-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
OperationID : d17bece7-7043-4233-8949-3962048396c6
Is this likely to be a problem the API or with my syntax, what are the likely causes for this?
Thank you Chaitanya.