agentleFS
soulemikesoulemike/microsoft-skills/agents.md

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.

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
  1. Common:

    Core Principle: No secret material is embedded in any skill.

    line 10
  2. Distinctive:

    All skills enforce this preference order.

    line 128

≈ “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.

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

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.md in 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 DomainStatusSkill Doc
Microsoft GraphCoveredskills/graph/SKILL.md
Azure Resource ManagerCoveredskills/azure/SKILL.md
DataverseCoveredskills/dataverse/SKILL.md
Power Platform / BAPCoveredskills/powerplatform/SKILL.md
Copilot StudioCoveredskills/copilotstudio/SKILL.md
Microsoft SentinelCoveredskills/sentinel/SKILL.md
Log AnalyticsCoveredskills/loganalytics/SKILL.md
Microsoft TeamsCoveredskills/teams/SKILL.md
Intune / Endpoint ManagerCoveredskills/intune/SKILL.md
VM Guest ManagementCoveredskills/vm-guest-management/SKILL.md
SharePoint OnlineGapagents.md#documented-gaps
Microsoft PurviewGapagents.md#documented-gaps
Microsoft DefenderGapagents.md#documented-gaps
Microsoft Fabric / Power BIGapagents.md#documented-gaps
Azure DevOpsGapagents.md#documented-gaps
Exchange OnlineGapagents.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 specification

Authentication Hierarchy

All skills enforce this preference order. See docs/auth-patterns.md for the full decision matrix.

RankMethodWhen to Use
1Managed IdentityAzure-hosted workloads (VM, Function App, App Service, Arc)
2Federated Credentials (OIDC)GitHub Actions, Azure DevOps, GitLab CI/CD
3Certificate-Based AuthHybrid, on-prem, or sovereign cloud where MI/OIDC unavailable
4Client SecretLast 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.

ParameterTypeRequiredDescription
-AuthenticationTypestringYesManagedIdentity, Federated, Certificate, ClientCredentials
-TenantIdstringConditionalRequired for Federated, Certificate, ClientCredentials
-ClientIdstringConditionalRequired for Federated, Certificate, ClientCredentials
-ClientSecretSecureStringConditionalRequired only for ClientCredentials
-CertificatePathstringConditionalRequired for Certificate
-CertificatePasswordSecureStringOptionalPassword for encrypted PFX
-FederatedTokenstringConditionalOIDC token from CI/CD platform
-UseManagedIdentityswitchNoAlias for -AuthenticationType ManagedIdentity
-Environment / -AzureEnvironmentstringYesAzureCloud, AzureUSGovernment, AzureChinaCloud

Multi-Tenant Authentication

Skills support multiple Entra ID tenants via:

  • Centralized config file: config.yaml with named profiles + -Profile parameter
  • Prefixed environment variables: PROD_TENANT_ID, GOV_CLIENT_ID, etc. + -Prefix parameter

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.

ServiceStatusNotes
SharePoint OnlineGapRequires PnP PowerShell for data plane; Graph has partial coverage. See skills/sharepoint-online/SKILL.md
Microsoft PurviewGapDocumented as future requirement. MCP servers: microsoft/purview-dlm-mcp, str-mcp-purview, scardoso-lu/purview-mcp-server
Microsoft DefenderGapDocumented as future requirement. MCP servers: MenkW/Defender-MCP, markolauren/ResponseMCP. Defender for Cloud remains uncovered.
Microsoft Fabric / Power BIGapDocumented as future requirement. MCP servers: microsoft/powerbi-modeling-mcp, enelyse/powerbi-mcp-server
Azure DevOpsGapDocumented as future requirement. MCP server: microsoft/azure-devops-mcp
Exchange OnlineGapDocumented 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 AzureUSGovernment

Standardized Context Object

All Connect-* scripts return a plain hashtable with these keys:

KeyTypeDescription
TokenstringBearer token for the target service audience
ExpiresOndatetimeToken expiry in UTC
TenantIdstringEntra ID tenant GUID
ClientIdstringApplication (client) ID
EnvironmentstringAzureCloud, AzureUSGovernment, or AzureChinaCloud
BaseUristringService-specific base endpoint
AuthenticationTypestringMethod 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

DocumentPurpose
README.mdProject overview, quickstart, file map
Per-skill docsDomain-specific patterns, toolchain, examples
docs/auth-patterns.mdAuth method selection guide
docs/secret-management.mdSecret hierarchy and hard prohibitions
docs/environment-endpoints.mdCross-cloud endpoint mapping
docs/token-chaining.mdCross-service token reuse
docs/multi-tenant-auth.mdMulti-context session management
docs/patterns-and-caveats.mdOperational lessons learned
docs/dll-conflict-mitigation.mdAz / Graph DLL version conflict mitigation, with DllPickle alignment and attribution
docs/project-positioning.mdEcosystem positioning
docs/competitive-landscape.mdAlternative solutions
docs/future-considerations.mdIntegration opportunities
docs/lsp-recommendations.mdLanguage Server Protocol guidance for contributors

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.