Skip Navigation

Create Azure Maps SAS token stored in an Azure Key Vault

Last updated: 10/24/2021

This template deploys and Azure Maps account and lists a Sas token based on the provided User Assigned identity to be stored in an Azure Key Vault secret.

This Azure Resource Manager template was created by a member of the community and not by Microsoft. Each Resource Manager template is licensed to you under a license agreement by its owner, not Microsoft. Microsoft is not responsible for Resource Manager templates provided and licensed by community members and does not screen for security, compatibility, or performance. Community Resource Manager templates are not supported under any Microsoft support program or service, and are made available AS IS without warranty of any kind.

Parameters

Parameter Name Description
location Specifies the location for all the resources.
keyVaultName Specifies the resourceId of the key vault.
accountName The name for the Azure Maps account.
userAssignedIdentityResourceId Specifies the resourceId for the user assigned managed identity resource.
userAssignedIdentityPrincipalId Specifies the resourceId for the user assigned managed identity resource.
pricingTier The pricing tier for the account. Use S0 for small-scale development. Use S1 or G2 for large-scale applications.
kind The pricing tier for the account. Use Gen1 for small-scale development. Use Gen2 for large-scale applications.
startDateTime Current Universal DateTime in ISO 8601 'u' format to be used as start of the SAS Token.
duration The duration of the SAS Token, P1Y is maximum, ISO 8601 format is expected.
maxRatePerSecond The approximate maximum rate per second the SAS token can be used.
signingKey The specified signing key which will be used to create the SAS Token.
allowedOrigins The specified application's web host header origins (example: https://www.azure.com) which the Maps account allows for Cross Origin Resource Sharing (CORS).

Use the template

PowerShell

New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.maps/maps-use-sas/azuredeploy.json
Install and configure Azure PowerShell

Command line

az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.maps/maps-use-sas/azuredeploy.json
Install and Configure the Azure Cross-Platform Command-Line Interface