agentleFS
Microsoft AzureKnown publisherAzure/azure-functions-connector-extension/.github/skills/connection-setup/SKILL.md

connection-setup

Skill1 starsChanged 37 days agoMITView on GitHub

Create and configure Connector Namespace connections for the Azure Functions Connector Extension. USE WHEN: setting up a new connector connection, creating a Connector Namespace, authorizing OAuth consent, adding access policies, or configuring deployed app settings. Covers Office365, SharePoint, Teams, and any Microsoft.Web/connections connector. NOT FOR: trigger registration (use webhook-trigger-registration or poll-trigger-registration), extension development, or code generation.

  • Pipes a download into a shell

4 other projects use a version of this, 4 of them edited.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. 2 are common, 2 are distinctive, and 3 are very specific to this project.

  • 2

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Check for an existing Connector Namespace in the resource group:

    line 45
  2. Common:

    If none exists, create one:

    line 53
  3. Distinctive:

    After the browser consent completes, verify the connection status:

    line 96
  4. Very specific:

    If status remains Error after consent, re-run the consent link command and try again.

    line 107
  5. Distinctive:

    If setup partially fails or resources are no longer needed, delete the connection first, then delete the namespace:

    line 154
  6. Very specific:

    Webhook delivery: Use webhook-trigger-registration.

    line 170
  7. Very specific:

    Host-pull Poll delivery: Use poll-trigger-registration.

    line 171

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Connector Namespace Connection Setup

Automates the end-to-end connection lifecycle for connector-triggered Azure Functions.

When to Use

  • Developer needs a new connector connection for local dev or a deployed Function App
  • Developer needs to authorize (OAuth consent) a connection
  • Developer needs to wire connection URLs into deployed app settings
  • Developer needs to grant access policies (CLI identity for local, managed identity for deployed)

Prerequisites

  • Azure CLI ≥ 2.75.0 installed and authenticated (az login)
  • connector-namespace CLI extension installed (see below)
  • Target subscription and resource group known
  • For deployed scenarios: Function App with managed identity enabled

Install the connector-namespace CLI extension

# Bash
curl -fsSL https://aka.ms/connector-namespace-cli-install | sh
# PowerShell
irm https://aka.ms/connector-namespace-cli-install-ps | iex
# Verify
az extension show --name connector-namespace --query "{name:name, version:version}" -o table

Procedure

Step 1: Create or Select Connector Namespace

Check for an existing Connector Namespace in the resource group:

$resourceGroup = "<resource-group>"

az connector-namespace list -g $resourceGroup -o table

If none exists, create one:

$namespaceName = "<namespace-name>"
$location = "<azure-region>"

az connector-namespace create -g $resourceGroup -n $namespaceName --location $location

Enable a system-assigned managed identity (required for trigger callback authentication):

az connector-namespace identity assign -g $resourceGroup --namespace $namespaceName --system-assigned

Step 2: Create Connection

$connectorName = "<connector-name>"      # e.g., "office365", "sharepointonline", "teams"
$connectionName = "<connection-name>"    # e.g., "office365-conn"

az connector-namespace connection create `
    -g $resourceGroup --namespace $namespaceName `
    -n $connectionName --connector-name $connectorName

The connection starts in Error state (unauthenticated). Proceed to Step 3.

Step 3: OAuth Consent (In-Browser)

Retrieve the consent link and open it in the default browser:

$result = az connector-namespace connection list-consent-links `
    -g $resourceGroup --namespace $namespaceName `
    --connection-name $connectionName `
    --parameters '[{"parameterName":"token","redirectUrl":"https://portal.azure.com"}]' `
    -o json | ConvertFrom-Json

$link = $result.value[0].link
Start-Process $link

After the browser consent completes, verify the connection status:

az connector-namespace connection show `
    -g $resourceGroup --namespace $namespaceName `
    -n $connectionName `
    --query "properties.statuses[0].status" -o tsv

Expected: Connected.

If status remains Error after consent, re-run the consent link command and try again. If repeated failures occur, delete and recreate the connection.

Step 4: Get Connection Runtime URL

$runtimeUrl = az connector-namespace connection show `
    -g $resourceGroup --namespace $namespaceName `
    -n $connectionName `
    --query "properties.connectionRuntimeUrl" -o tsv
Write-Output "Runtime URL: $runtimeUrl"

Step 5: Add Access Policies

Note: Access policies are required when the Function identity calls connector actions or Connector Namespace Poll runtime endpoints. A Webhook-only trigger that only receives callbacks does not require one.

For local development (Azure CLI identity)

$userObjectId = az ad signed-in-user show --query "id" -o tsv
$tenantId = az account show --query "tenantId" -o tsv

az connector-namespace connection access-policy create `
    -g $resourceGroup --namespace $namespaceName `
    --connection-name $connectionName -n local-dev `
    --principal "identity.object-id=$userObjectId identity.tenant-id=$tenantId type=ActiveDirectory"

For deployed Function App (system-assigned managed identity)

$functionAppName = "<function-app-name>"
$msiObjectId = az functionapp identity show -g $resourceGroup -n $functionAppName --query "principalId" -o tsv
$tenantId = az account show --query "tenantId" -o tsv

az connector-namespace connection access-policy create `
    -g $resourceGroup --namespace $namespaceName `
    --connection-name $connectionName -n functionapp-msi `
    --principal "identity.object-id=$msiObjectId identity.tenant-id=$tenantId type=ActiveDirectory"

ACL propagation takes 1-5 minutes. If you get 403 errors immediately after adding, wait and retry.

Cleanup / Teardown

If setup partially fails or resources are no longer needed, delete the connection first, then delete the namespace:

az connector-namespace connection delete `
    -g $resourceGroup --namespace $namespaceName `
    -n $connectionName

az connector-namespace delete -g $resourceGroup -n $namespaceName

Supported Connectors

arm, azureblob, azureeventgrid, azuremonitorlogs, office365, office365users, onedriveforbusiness, sharepointonline, teams, kusto, smtp, keyvault, planner, todo, and any Microsoft.Web/connections connector name.

Next Steps

  • Webhook delivery: Use webhook-trigger-registration.
  • Host-pull Poll delivery: Use poll-trigger-registration.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.