microsoft-skills
AGENTS.md2 starsChanged 3 months agoMITView on GitHub
Note: This document is the master design specification for human maintainers. For the machine-readable agent contract, see AGENTS.md in the repository root. This project provides a modular package of reusable skills for working with different Microsoft cloud service APIs. The goal is to generalize and abstract the connection patterns, authentication flows, and API interaction models observed across diverse Microsoft cloud automation scenarios into a cohesive, reusable toolkit. Core Principle: No secret material is embedded in any skill. All skills require…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- azureSkill
- copilotstudioSkill
- dataverseSkill
- graphSkill
- intuneSkill
- loganalyticsSkill
- powerplatformSkill
- sentinelSkill
- sharepoint-onlineSkill
- teamsSkill
- vm-guest-managementSkill
The file
We split this agents.md into the rules it gives an agent
2 rules. About 1 is common, 1 is distinctive, and 0 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 10
Core Principle: No secret material is embedded in any skill.
- Distinctive: line 128
All skills enforce this preference order.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Microsoft Cloud API Skills - Agent Context
Note: This document is the master design specification for human maintainers. For the machine-readable agent contract, see
AGENTS.mdin the repository root.
Project Objective
This project provides a modular package of reusable skills for working with different Microsoft cloud service APIs. The goal is to generalize and abstract the connection patterns, authentication flows, and API interaction models observed across diverse Microsoft cloud automation scenarios into a cohesive, reusable toolkit.
Core Principle: No secret material is embedded in any skill. All skills require explicit secret management through the approved hierarchy, with clear prerequisites documented per skill.
Scope and Service Coverage
| Service Domain | Status | Skill Doc |
| Microsoft Graph | Covered | skills/graph/SKILL.md |
| Azure Resource Manager | Covered | skills/azure/SKILL.md |
| Dataverse | Covered | skills/dataverse/SKILL.md |
| Power Platform / BAP | Covered | skills/powerplatform/SKILL.md |
| Copilot Studio | Covered | skills/copilotstudio/SKILL.md |
| Microsoft Sentinel | Covered | skills/sentinel/SKILL.md |
| Log Analytics | Covered | skills/loganalytics/SKILL.md |
| Microsoft Teams | Covered | skills/teams/SKILL.md |
| Intune / Endpoint Manager | Covered | skills/intune/SKILL.md |
| VM Guest Management | Covered | skills/vm-guest-management/SKILL.md |
| SharePoint Online | Gap | agents.md#documented-gaps |
| Microsoft Purview | Gap | agents.md#documented-gaps |
| Microsoft Defender | Gap | agents.md#documented-gaps |
| Microsoft Fabric / Power BI | Gap | agents.md#documented-gaps |
| Azure DevOps | Gap | agents.md#documented-gaps |
| Exchange Online | Gap | agents.md#documented-gaps |
Modular Skill Architecture
Each skill is designed as an independent, composable unit following PowerShell module conventions (where applicable) or script-based wrappers:
.
├── skills/
│ ├── Common.psm1 # Shared auth, REST, pagination, endpoint resolution
│ ├── graph/
│ │ ├── SKILL.md # Graph-specific patterns, toolchain, examples
│ │ ├── Connect-GraphApi.ps1
│ │ ├── Invoke-GraphRequest.ps1
│ │ └── auth/
│ ├── azure/
│ │ ├── SKILL.md # ARM-specific patterns, async ops, examples
│ │ ├── Connect-AzureApi.ps1
│ │ ├── Invoke-AzureRestMethod.ps1
│ │ └── auth/
│ ├── dataverse/
│ │ ├── SKILL.md # OData, GDS, file ops, examples
│ │ ├── Connect-DataverseApi.ps1
│ │ ├── Invoke-DataverseRequest.ps1
│ │ ├── Get-DataverseEnvironment.ps1
│ │ └── auth/
│ ├── powerplatform/
│ │ ├── SKILL.md # BAP API, ARM token, examples
│ │ ├── Connect-PowerPlatformApi.ps1
│ │ └── Get-PowerPlatformEnvironment.ps1
│ ├── copilotstudio/
│ │ ├── SKILL.md # Dataverse bot entity, knowledge sources, examples
│ │ ├── Deploy-CopilotAgent.ps1
│ │ ├── Get-CopilotAgentInfo.ps1
│ │ └── Manage-CopilotKnowledge.ps1
│ ├── sentinel/
│ │ ├── SKILL.md # ARM management plane, incidents, alert rules
│ │ ├── Invoke-SentinelArmRequest.ps1
│ │ ├── Get-SentinelIncident.ps1
│ │ └── Get-SentinelAlertRule.ps1
│ ├── loganalytics/
│ │ ├── SKILL.md # KQL, workspace lifecycle, DCE/DCR, ingestion fallback
│ │ ├── Connect-LogAnalyticsApi.ps1
│ │ ├── Invoke-LogAnalyticsKqlQuery.ps1
│ │ ├── New-LogAnalyticsWorkspace.ps1
│ │ ├── New-LogAnalyticsCustomTable.ps1
│ │ ├── New-LogAnalyticsIngestionPipeline.ps1
│ │ ├── Send-LogAnalyticsData.ps1
│ │ └── auth/
│ ├── teams/
│ │ ├── SKILL.md # Graph v1.0 patterns, examples
│ │ ├── Get-TeamsChannel.ps1
│ │ ├── Get-TeamsMember.ps1
│ │ └── Invoke-TeamsGraphRequest.ps1
│ ├── intune/
│ │ ├── SKILL.md # v1.0 vs beta, list-vs-get, examples
│ │ ├── Get-IntuneDevice.ps1
│ │ ├── Get-IntuneConfigurationPolicy.ps1
│ │ └── Invoke-IntuneGraphRequest.ps1
│ ├── vm-guest-management/
│ │ ├── SKILL.md # Run Command, Bastion, SSH patterns
│ │ ├── Invoke-VmRunCommand.ps1
│ │ ├── Connect-VmBastionSsh.ps1
│ │ ├── Invoke-VmSshKeyRotation.ps1
│ │ └── Configure-VmSshServer.ps1
│ ├── sharepoint-online/ # Gap — directory placeholder only
│ │ └── SKILL.md # SharePoint Online gap documentation
│ ├── powerplatform/ # Covered
│ └── copilotstudio/ # Covered
├── prerequisites/
│ ├── Setup-AuthenticationContext.ps1 # Guided auth method detection and setup
│ ├── Install-RequiredModules.ps1 # Az, Microsoft.Graph, etc.
│ └── Test-Prerequisites.ps1 # Verify environment readiness
├── docs/
│ ├── auth-patterns.md # Decision matrix for auth method selection
│ ├── environment-endpoints.md # Commercial vs Gov vs China endpoint mapping
│ ├── secret-management.md # Secret hierarchy and configuration guidance
│ ├── token-chaining.md # Cross-platform token chaining patterns and examples
│ ├── patterns-and-caveats.md # Observed patterns, lessons learned, and edge cases
│ ├── multi-tenant-auth.md # Multi-tenant and multi-context authentication guidance
│ ├── project-positioning.md # Ecosystem positioning and unique value proposition
│ ├── competitive-landscape.md # Competitor and alternative analysis
│ └── future-considerations.md # Optional integration opportunities (not in scope)
├── .env.example # Environment variable template with multi-tenant prefixes
├── config.example.yaml # Example multi-tenant configuration file
├── README.md # Project overview, quickstart, file map
└── agents.md # This file — master index and design specificationAuthentication Hierarchy
All skills enforce this preference order. See docs/auth-patterns.md for the full decision matrix.
| Rank | Method | When to Use |
| 1 | Managed Identity | Azure-hosted workloads (VM, Function App, App Service, Arc) |
| 2 | Federated Credentials (OIDC) | GitHub Actions, Azure DevOps, GitLab CI/CD |
| 3 | Certificate-Based Auth | Hybrid, on-prem, or sovereign cloud where MI/OIDC unavailable |
| 4 | Client Secret | Last resort only — emits a mandatory runtime warning |
Interactive authentication (device code flow, browser login) is not permitted for skill execution.
Normalized Authentication Parameter Set
All Connect-* functions expose a consistent parameter set. See docs/auth-patterns.md for the full contract.
| Parameter | Type | Required | Description |
-AuthenticationType | string | Yes | ManagedIdentity, Federated, Certificate, ClientCredentials |
-TenantId | string | Conditional | Required for Federated, Certificate, ClientCredentials |
-ClientId | string | Conditional | Required for Federated, Certificate, ClientCredentials |
-ClientSecret | SecureString | Conditional | Required only for ClientCredentials |
-CertificatePath | string | Conditional | Required for Certificate |
-CertificatePassword | SecureString | Optional | Password for encrypted PFX |
-FederatedToken | string | Conditional | OIDC token from CI/CD platform |
-UseManagedIdentity | switch | No | Alias for -AuthenticationType ManagedIdentity |
-Environment / -AzureEnvironment | string | Yes | AzureCloud, AzureUSGovernment, AzureChinaCloud |
Multi-Tenant Authentication
Skills support multiple Entra ID tenants via:
- Centralized config file:
config.yamlwith named profiles +-Profileparameter - Prefixed environment variables:
PROD_TENANT_ID,GOV_CLIENT_ID, etc. +-Prefixparameter
See docs/multi-tenant-auth.md for full guidance.
Documented Gaps
These service domains are scoped but not yet implemented in this PowerShell toolkit. However, dedicated MCP servers now exist for each gap — see docs/future-considerations.md for a comprehensive catalog.
| Service | Status | Notes |
| SharePoint Online | Gap | Requires PnP PowerShell for data plane; Graph has partial coverage. See skills/sharepoint-online/SKILL.md |
| Microsoft Purview | Gap | Documented as future requirement. MCP servers: microsoft/purview-dlm-mcp, str-mcp-purview, scardoso-lu/purview-mcp-server |
| Microsoft Defender | Gap | Documented as future requirement. MCP servers: MenkW/Defender-MCP, markolauren/ResponseMCP. Defender for Cloud remains uncovered. |
| Microsoft Fabric / Power BI | Gap | Documented as future requirement. MCP servers: microsoft/powerbi-modeling-mcp, enelyse/powerbi-mcp-server |
| Azure DevOps | Gap | Documented as future requirement. MCP server: microsoft/azure-devops-mcp |
| Exchange Online | Gap | Documented as future requirement. MCP servers: softeria/ms-365-mcp-server, DustHoff/msgraphmcp, dsswift/mcp-exchange |
Commands
# Install prerequisites
./prerequisites/Install-RequiredModules.ps1
# Verify environment
./prerequisites/Test-Prerequisites.ps1
# Import service modules with conflict-aware ordering (recommended before using multiple Microsoft modules)
./prerequisites/Import-ConflictSafeModules.ps1
# Run smoke tests (no live auth required)
./prerequisites/Test-Smoke.ps1
# Run token validation tests (audience mismatches, expiry)
./prerequisites/Test-TokenValidation.ps1
# Load .env file (optional)
Import-Module ./skills/Common.psm1
Load-DotEnv -Path "./.env"
# Auto-detect authentication
$authContext = ./prerequisites/Setup-AuthenticationContext.ps1 -Resource "https://management.azure.com/"
# Example: Connect to Graph with explicit parameters
./skills/graph/Connect-GraphApi.ps1 -AuthenticationType ManagedIdentity -Environment AzureCloud
# Example: Connect to Graph with a config profile
./skills/graph/Connect-GraphApi.ps1 -Profile "prod" -ConfigPath "./config.yaml"
# Example: Connect to Graph with prefixed environment variables
./skills/graph/Connect-GraphApi.ps1 -Prefix "GOV" -Environment AzureUSGovernmentStandardized Context Object
All Connect-* scripts return a plain hashtable with these keys:
| Key | Type | Description |
Token | string | Bearer token for the target service audience |
ExpiresOn | datetime | Token expiry in UTC |
TenantId | string | Entra ID tenant GUID |
ClientId | string | Application (client) ID |
Environment | string | AzureCloud, AzureUSGovernment, or AzureChinaCloud |
BaseUri | string | Service-specific base endpoint |
AuthenticationType | string | Method used: ManagedIdentity, Federated, Certificate, ClientCredentials |
Service-specific additions:
- Azure ARM:
SubscriptionId,ArmEndpoint - Dataverse:
EnvironmentUrl - Power Platform:
BapEndpoint
Downstream skill scripts accept this context via -AuthContext (or -Context for service-specific wrappers) and validate required fields before use.
Stack
- PowerShell (primary skill language)
- Python (auxiliary scripts, certificate handling, token decoding)
- Bicep / Azure CLI (Azure deployment skills)
Documentation Index
| Document | Purpose |
| README.md | Project overview, quickstart, file map |
| Per-skill docs | Domain-specific patterns, toolchain, examples |
| docs/auth-patterns.md | Auth method selection guide |
| docs/secret-management.md | Secret hierarchy and hard prohibitions |
| docs/environment-endpoints.md | Cross-cloud endpoint mapping |
| docs/token-chaining.md | Cross-service token reuse |
| docs/multi-tenant-auth.md | Multi-context session management |
| docs/patterns-and-caveats.md | Operational lessons learned |
| docs/dll-conflict-mitigation.md | Az / Graph DLL version conflict mitigation, with DllPickle alignment and attribution |
| docs/project-positioning.md | Ecosystem positioning |
| docs/competitive-landscape.md | Alternative solutions |
| docs/future-considerations.md | Integration opportunities |
| docs/lsp-recommendations.md | Language Server Protocol guidance for contributors |
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
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.

