Introduction to Azure CSP
Microsoft Azure is an open and flexible cloud platform that enables partners to rapidly build, deploy, and manage secure applications at scale on premises, in the cloud, or both. Azure is now available to partners through rhipe on the Microsoft CSP Program. This allows you to capitalise on the Azure opportunity with all the benefits of CSP through rhipe. Therefore you will own the end-to-end customer lifecycle with direct provisioning, billing, and support. You can also offer your customers solution delivery and a complete managed services offering, ran on Azure.
Using PowerShell with Azure in CSP is really simple, however we need to be mindful that most documentation circulating on the internet is aimed at customers and not partners. In order to use PowerShell effectively we need to make a couple of small adjustments to the scripts. Azure in CSP uses the Azure Resource Manager cmdlets, however Azure Service Manager is not available within CSP. See here for details on how to install the ARM cmdlets:
- How is it normally done?
Most documentation and scripts you'll find use a method similar to the below. It uses the subscriptions associated with your login details, and it works really well for customers.
Virtually all TechNet articles will tell you to use the -SubscriptionName cmdlet, this will not work for partners managing an Azure subscription on behalf of a customer.
$subscription = (Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru).SubscriptionName
Select-AzureRmSubscription -SubscriptionName $subscription
- Why does this not work?
This is not a unique issue to CSP, most documentation is written with customers in mind and not partners. A single customer will often only ever have to manage a handful of subscriptions, where as partners are managing dozens if not hundreds or even thousands of subscriptions.As a partner, subscriptions are not assigned to you directly like they are to customers,but rather the access is delegated to you via the Microsoft Partner Center. We need to clearly specify which customer and which of their subscriptions we'd like to manage as to avoid any mistakes and possibly provisioning services for the wrong customer. I would discourage people from using -SubscriptionName in favor of -SubscritionId as it is a unique value unlike the name.
- What do we need to do differently?
In order to select the subscription we'd like to use we first need to specify the -TenantId and then -SubscriptionId. We'll use a Write-Host and Read-Host to set the two values as variables to be used later.
Write-Host "`n`tEnter the Customer Tenant ID: " -ForegroundColor Cyan -nonewline;
$choice = Read-Host
$TenantId = $choice
Write-Host "`n`tEnter the Customer Subscription ID: " -ForegroundColor Cyan -nonewline;
$choice = Read-Host
$SubscriptionId = $choice
Select-AzureRmSubscription -TenantId $TenantId -SubscriptionId $SubscriptionId
Use -SubscriptionId instead of -SubscriptionName
About the author
Andrey Korenkov is a Strategy and Enablement Specialist at rhipe delivering partner transformation through the strategic implementation of Microsoft cloud technologies. Andrey has seven years of experience in Microsoft cloud technologies working with Microsoft enterprise licensing, service providers and channel partners. He is driven to help rhipe partners adopt and deliver new cloud technologies while ensuring they are minimisng risk and reducing their administrative headaches.