Azure / Azure/azure-dev

Unable to run tenant level deployments

Open
#4,643 1 comment 0 reactions 0 assignees View on GitHub
area/bicep area/core-cli bug
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

- [ ] Make sure you've installed the latest version using [instructions in the wiki](../wiki/install)

**Output from `azd version`**
azd version 1.11.0 (commit 5b92e0687e1fa96dfc8292f4b900c0c58610b6a5)

**Describe the bug**
Attempting to use azd to perform tenant/entra setup operations using the [Microsoft Graph bicep extension](https://learn.microsoft.com/en-gb/graph/templates/quickstart-create-bicep-interactive-mode?view=graph-bicep-1.0&tabs=CLI). The bicep template executes tenant level deployment `targetScope = 'tenant'`

Executing azd provision or azd up fails with
```text
ERROR: initializing provisioning manager: unknown schema: https://schema.management.azure.com/schemas/2019-08-01/tenantDeploymentTemplate.json#
```

**To Reproduce**

bicep
```bicep
targetScope = 'tenant'
extension microsoftGraphV1

resource grp_test 'Microsoft.Graph/groups@v1.0' = {
displayName: 'Test Group'
mailEnabled: false
mailNickname: 'test-group'
securityEnabled: true
uniqueName: 'test-group'
}
```
```bicepconfig.json
{
"experimentalFeaturesEnabled": {
"extensibility": true,
"extensionRegistry": true
},
"extensions": {
"microsoftGraphV1": "br:mcr.microsoft.com/bicep/extensions/microsoftgraph/v1.0:0.1.8-preview"
}
}
```

run `azd provision`

**Expected behavior**
Create the group in entra. It should execute equivalent of `az deployment tenant create... `. NOTE that this runs tenant level deployment to work.

**Environment**
VSCode 1.96.1
azcli: 2.67.0
az bicep version -> Bicep CLI version 0.32.4 (b326faa456)
Devcontainer config
```json
{
"name": "Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/azure-cli": {
"version": "latest"
},
"ghcr.io/azure/azure-dev/azd:latest": {
"version": "latest"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-bicep",
"ms-azuretools.vscode-azure-github-copilot",
"yzhang.markdown-all-in-one",
"ms-vscode.azurecli",
"github.copilot",
"github.copilot-chat"

]
}
}
}

```

**Additional context**
We are trying to use azd to help with bicep and bash scripts that automate configuration of entra tenants and deploy singleton resources in the tenant (container registry, fabric capacity, managed identities, etc).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.