Cross-subscription circuit links that cross the ARM/classic boundary

(contributed by Michael Jolley)

While enabling an ARM circuit for use with classic deployments is fairly straightforward on its own, it can be confusing to do so as part of creating cross-subscription circuit links with classic deployments. To do the circuit links, you have to switch between ARM and classic mode while simultaneously switching subscriptions. This can lead to some serious confusion, so I thought it would be worthwhile to document the exact steps and the corresponding PowerShell commands.

 This walkthrough assumes you have two subscriptions named as follows:

 1)      Subscription A that contains your ARM circuit

2)      Subscription B that contains your ASM VNET

 First, let’s log into ARM under Subscription A so we can enable the circuit for classic operations.

 # Sign in to your Azure Resource Manager environment

$SubscriptionA=”GUID for Subscription A”

$SubscriptionB=”GUID for Subscription B”


 # Select the appropriate Azure subscription

Get-AzureRmSubscription -SubscriptionId $SubscriptionA | Select-AzureRmSubscription

 # Get details of the ExpressRoute circuit

$ckt = Get-AzureRmExpressRouteCircuit -Name "DemoCkt" -ResourceGroupName "DemoRG"

 # Set "Allow Classic Operations" to TRUE

$ckt.AllowClassicOperations = $true

 # Update circuit

Set-AzureRmExpressRouteCircuit -ExpressRouteCircuit $ckt

Now, let’s create the circuit link authorization for the classic VNET. Since we are creating an authorization for use by a classic deployment in Subscription B, you will use the classic commands. Note that since Subscription A owns the circuit, we are still logging in as Subscription A.

# Sign in to your classic environment


# Select the appropriate Azure subscription

Set-AzureSubscription -SubscriptionId $SubscriptionA

# Create the classic authorization

New-AzureDedicatedCircuitLinkAuthorization -ServiceKey $ckt.ServiceKey -Description "Dev-Test Links" -Limit 2 -MicrosoftIds ''

Description         : Dev-Test Links

Limit               : 2

LinkAuthorizationId : **********************************

MicrosoftIds        :

Used                : 0

Next, log into Subscription B. Because you are wanting to work with a classic VNET, you need to log in using the classic mode. Since you already logged in under classic mode, all you need to do is change to Subscription B.

# Select the appropriate Azure subscription

Set-AzureSubscription -SubscriptionId $SubscriptionB

Now, use the authorization. Again, since we are linking to a classic VNET, we will continue to use the classic commands.

# Use the classic authorization

New-AzureDedicatedCircuitLink –servicekey $ckt.ServiceKey –VnetName 'ClassicVNET1'

State VnetName

----- --------

Provisioned ClassicVNET1