AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

azure-deploy

Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.

Original source
microsoft
License
MIT
Pinned revision
3f5b461b2314e01c400564051e92469114c5b68f

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read microsoft--azure-deploy at revision 3f5b461b2314e01c400564051e92469114c5b68f, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 33

references/recipes/azd/sql-entra-auth.md

SQL Database Entra Authentication

Quick reference for Azure SQL Database Entra authentication in post-deployment scenarios.

Prerequisites

Azure SQL Server must be configured with Entra-only authentication during provisioning. The signed-in user must be set as Entra admin:

@allowed(['User', 'Group', 'Application'])
param principalType string = 'User'

properties: {
  administrators: {
    administratorType: 'ActiveDirectory'
    principalType: principalType  // 'User' for interactive, 'Application' for CI/CD
    login: principalName
    sid: principalId
    tenantId: subscription().tenantId
    azureADOnlyAuthentication: true
  }
}

⚠️ Warning: Hardcoding principalType: 'User' causes UnmatchedPrincipalType errors when deploying from CI/CD with a service principal. Use a parameter instead.

Connection Patterns

Azure CLI (Recommended for Scripts)

⚠️ Warning: az sql db query requires the rdbms-connect extension. Install it first: az extension add --name rdbms-connect --yes

az sql db query \
  --server "$SQL_SERVER" \
  --database "$SQL_DATABASE" \
  --resource-group "$AZURE_RESOURCE_GROUP" \
  --auth-mode ActiveDirectoryDefault \
  --queries "SELECT 1"

Connection Strings

For .NET applications with managed identity:

Server=tcp:{server}.database.windows.net,1433;Database={database};Authentication=Active Directory Default;Encrypt=True;

Required packages:

  • Microsoft.Data.SqlClient (v5.1.0+)
  • Azure.Identity (for local development)

Database Roles

| Role | Permissions | Use For | |------|------------|---------| | db_datareader | SELECT | Read operations | | db_datawriter | INSERT, UPDATE, DELETE | Write operations | | db_ddladmin | CREATE, ALTER, DROP schema | EF migrations | | db_owner | Full control | Admin (use sparingly) |

Grant Managed Identity Access

-- Create user from managed identity
CREATE USER [app-name] FROM EXTERNAL PROVIDER;

-- Grant standard application permissions
ALTER ROLE db_datareader ADD MEMBER [app-name];
ALTER ROLE db_datawriter ADD MEMBER [app-name];
ALTER ROLE db_ddladmin ADD MEMBER [app-name];

💡 Tip: The managed identity name matches the App Service or Container App name.

Verify Current Admin

az sql server ad-admin list \
  --server "$SQL_SERVER" \
  --resource-group "$AZURE_RESOURCE_GROUP"

References