Quickstart: Install Bicep tools

Before you can deploy Microsoft Graph Bicep types, you must set up your authoring and deployment environment. This article shows you how to install the following tools, which are used in quickstarts and tutorials in this documentation:

  • For authoring: Visual Studio Code (VS Code) and Bicep extension
    • Ensure that you have Bicep version v0.29.45 or greater
  • For deployment: Azure CLI

Alternatively, you can use Visual Studio and Bicep extension for authoring, and Azure PowerShell for deployment. For more information, see Install Bicep tools.

Important

Microsoft Graph Bicep is currently in PREVIEW. See the Supplemental Terms of Use for Microsoft Azure Previews for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.

VS Code and Bicep extension

To create Bicep files, you need a good Bicep editor. We recommend:

  • Visual Studio Code - If you don't already have Visual Studio Code, install it.

  • Bicep extension for Visual Studio Code. Visual Studio Code with the Bicep extension provides language support and resource autocompletion. The extension helps you create and validate Bicep files.

    To install the extension, search for bicep in the Extensions tab or in the Visual Studio marketplace.

    Select Install.

    Screenshot of installing Bicep extension.

To verify you've installed the extension, open any file with the .bicep file extension. You should see the language mode in the lower right corner change to Bicep.

Screenshot of Bicep language mode.

If you get an error during installation, see Troubleshoot Bicep installation.

Azure CLI

When you use Azure CLI with Bicep, you have everything you need to deploy and decompile Bicep files. Azure CLI automatically installs the Bicep CLI when a command is executed that needs it.

You must have Azure CLI version 2.20.0 or later installed. To install or update Azure CLI, see:

To verify your current version, run:

az --version

To validate your Bicep CLI installation, use:

az bicep version

To upgrade to the latest version, use:

az bicep upgrade

For more commands, see Bicep CLI.

Important

Azure CLI installs a self-contained instance of the Bicep CLI. This instance doesn't conflict with any versions you may have manually installed. Azure CLI doesn't add Bicep CLI to your PATH.

You've set up your Bicep environment. You can now proceed to author a Bicep file that declares Microsoft Graph resources and deploy that file in interactive mode.

Next step