azure-postgres

microsoft/github-copilot-for-azure · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/microsoft/github-copilot-for-azure --skill azure-postgres
0 commentsdiscussion
summary

Passwordless PostgreSQL authentication on Azure with Microsoft Entra ID integration.

  • Configures Entra ID authentication for Azure Database for PostgreSQL Flexible Server, eliminating password-based access in favor of token-based authentication
  • Supports three access patterns: developer identities, managed identities for Azure-hosted applications, and group-based permissions via Azure AD groups
  • Includes migration tooling to transition existing password-authenticated databases to Entra
skill.md

Azure Database for PostgreSQL

Configure passwordless authentication with Microsoft Entra ID for existing Azure Database for PostgreSQL Flexible Server. This skill focuses on setting up Entra ID authentication, managing user access, and migrating from password-based authentication.

Primary use cases:

  • Migrating existing PostgreSQL databases from password to Entra ID authentication
  • Setting up developer access with Azure identities
  • Configuring managed identity access for Azure-hosted applications
  • Managing group-based access control and permissions

MCP Tools (Preferred)

When Azure MCP is enabled, use these tools for PostgreSQL operations:

  • azure__postgres with command postgres_server_list - List PostgreSQL servers
  • azure__postgres with command postgres_database_list - List databases on a server
  • azure__postgres with command postgres_database_query - Execute SQL queries
  • azure__postgres with command postgres_server_param_get - Get server parameters
  • azure__postgres with command postgres_server_param_set - Set server parameters

CLI Commands (Fallback)

az postgres flexible-server list --output table
az postgres flexible-server db list --server-name SERVER -g RG
az postgres flexible-server show --name SERVER -g RG
az postgres flexible-server create --name SERVER -g RG --location REGION --admin-user ADMIN --version 16

Quick Reference

Property Value
CLI prefix az postgres flexible-server
MCP tools azure__postgres
Best for Relational data, PostgreSQL compatibility, PostGIS
Engine versions PostgreSQL 11, 12, 13, 14, 15, 16 (recommended)

Working with Existing PostgreSQL Servers

This skill primarily focuses on configuring authentication for existing PostgreSQL servers. If you need to reference or create servers, use MCP tools or CLI commands, and provide Azure Portal links for easy access.

Portal Link Format:

https://portal.azure.com/#@{tenant-domain}/resource/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{server-name}/overview

Example portal link:

View in Azure Portal:
https://portal.azure.com/#resource/subscriptions/abc123.../resourceGroups/myrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/myserver/overview

Microsoft Entra ID Authentication (Critical)

⚠️ ALWAYS use passwordless authentication with Entra ID for production workloads.

Complete Setup Guide

→ Microsoft Entra ID Authentication Setup Guide

This guide covers:

  • Enabling Entra ID authentication on PostgreSQL servers
  • Creating PostgreSQL roles mapped to Azure identities
  • Granting database permissions
  • Connecting with access tokens instead of passwords

Quick Setup Patterns

Use these patterns based on your scenario:

Scenario Guide Link Use When
Developer Access Pattern 1 Grant developers access with their Azure identity
App Authentication Pattern 2 Passwordless access for Azure-hosted apps (Container Apps, App Service, Functions)
Team Access Pattern 3 Manage permissions via Azure AD groups
Connection Issues Troubleshooting Diagnose authentication and connection failures
Migration Pattern 5 Transition from password to Entra ID authentication

Service Tiers

Tier vCores Memory Use Case
Burstable 1-20 0.5-4 GB/vCore Dev/test, low traffic
General Purpose 2-64 4 GB/vCore Most production workloads
Memory Optimized 2-64 8 GB/vCore High-memory workloads

Start with Burstable for dev/test, scale up as needed.

Common Issues

Issue Cause Solution
role does not exist Role not created in database Run pgaadauth_create_principal - see guide
password authentication failed Token expired (5-60 min validity) Get fresh token: az account get-access-token --resource-type oss-rdbms
permission denied Role lacks permissions Run GRANT statements - see templates
Connection timeout Firewall blocking access Add firewall rule: az postgres flexible-server firewall-rule create
Guest user login fails Wrong UPN format Use full UPN with #EXT# tag from Azure AD

SDK Quick References

References

how to use azure-postgres

How to use azure-postgres on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add azure-postgres
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/microsoft/github-copilot-for-azure --skill azure-postgres

The skills CLI fetches azure-postgres from GitHub repository microsoft/github-copilot-for-azure and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/azure-postgres

Reload or restart Cursor to activate azure-postgres. Access the skill through slash commands (e.g., /azure-postgres) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.548 reviews
  • Jin Menon· Dec 20, 2024

    Useful defaults in azure-postgres — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Henry Gonzalez· Dec 12, 2024

    We added azure-postgres from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Dhruvi Jain· Dec 4, 2024

    azure-postgres reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Oshnikdeep· Nov 23, 2024

    I recommend azure-postgres for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Jin Verma· Nov 11, 2024

    Registry listing for azure-postgres matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Henry Khan· Nov 3, 2024

    Keeps context tight: azure-postgres is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Henry Martinez· Oct 22, 2024

    azure-postgres is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Ganesh Mohane· Oct 14, 2024

    Useful defaults in azure-postgres — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Jin Abbas· Oct 2, 2024

    azure-postgres reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Jin Ramirez· Sep 21, 2024

    azure-postgres is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

showing 1-10 of 48

1 / 5