# ms365-tenant-manager

ms365-tenant-manager writes PowerShell scripts for Microsoft 365 admins: tenant setup, user onboarding and offboarding, Conditional Access policies and security audits.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 127 installs · ★ 1183 repo stars
- Author: borghei
- License: LicenseRef-MIT-Commons-Clause · policy=link-only · description only; the file stays with the author
- Source: https://github.com/borghei/Claude-Skills/tree/HEAD/engineering/ms365-tenant-manager/SKILL.md
- Updated: 2026-11-08
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/borghei-ms365-tenant-manager

## What it does

This skill produces PowerShell scripts built on Microsoft Graph for someone holding the Global Administrator role. It drafts a setup checklist for a new Microsoft 365 tenant, DNS records for the domain, bulk user creation from a CSV, and license suggestions per role or department. Name GDPR or HIPAA and the SKU suggestions shift accordingly.

The logic sits in three importable Python modules, not command-line tools. `powershell_generator.py` (`PowerShellScriptGenerator`) handles audits, Conditional Access and license scripts. `user_management.py` (`UserLifecycleManager`) covers onboarding and offboarding, and `tenant_setup.py` (`TenantSetupManager`) covers the checklist and DNS. Generated scripts log their work, handle errors and accept `-WhatIf`. The audit spans 7 categories, from MFA and admin roles to guests and mailbox delegations.

Conditional Access policies come out in report-only mode first. Offboarding runs through 11 steps and keeps the mailbox. If your identity setup is hybrid, synced from on-premises AD through AD Connect, this skill won't help. Intune and Power Platform are outside it too.

## Requirements
- Works with: Azure

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill ms365-tenant-manager -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ms365-tenant-manager/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ms365-tenant-manager/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill ms365-tenant-manager -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ms365-tenant-manager/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill ms365-tenant-manager -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ms365-tenant-manager/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install borghei/Claude-Skills engineering/ms365-tenant-manager/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/ms365-tenant-manager/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill ms365-tenant-manager -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/borghei/Claude-Skills --path engineering/ms365-tenant-manager
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ms365-tenant-manager/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add borghei/Claude-Skills --skill ms365-tenant-manager -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/borghei/Claude-Skills/tree/HEAD/engineering/ms365-tenant-manager/SKILL.md

## When to use it
- Draft a setup checklist and DNS records for a new Microsoft 365 tenant
- Create accounts in bulk from a CSV with licenses matched to department
- Audit a tenant for missing MFA and inactive accounts
- Generate a Conditional Access policy in report-only mode
- Offboard a leaver while keeping their mailbox

## Example prompts
- Use ms365-tenant-manager to build a setup checklist and DNS records for my new tenant
- Run a security audit of my Microsoft 365 tenant and list users without MFA
- Offboard a departing employee with ms365-tenant-manager and keep their mailbox

## Similar
- [microsoft-graph](https://affpapa.org/en/nevibecode/skills/microsoft-graph.md) — skill · 263 installs
- [Microsoft 365 Admin](https://affpapa.org/en/nevibecode/mcp/microsoft-365-admin.md) — MCP server · ★ 20 repo stars
- [identity-access-management](https://affpapa.org/en/nevibecode/skills/identity-access-management.md) — skill · 351 installs
- [entra-agent-user](https://affpapa.org/en/nevibecode/skills/entra-agent-user.md) — skill · 8600 installs
- [msgraph-sdk](https://affpapa.org/en/nevibecode/skills/msgraph-sdk.md) — skill · 57 installs
- [auditing-azure-active-directory-configuration](https://affpapa.org/en/nevibecode/skills/auditing-azure-active-directory-configuration.md) — skill · 241 installs

## Other versions with the same name
- [ms365-tenant-manager · alirezarezvani](https://affpapa.org/en/nevibecode/skills/ms365-tenant-manager.md) — 783 installs
- [ms365-tenant-manager · alirezarezvani](https://affpapa.org/en/nevibecode/skills/alirezarezvani-ms365-tenant-manager.md) — ★ 907 repo stars

From the same set: [borghei/claude-skills](https://affpapa.org/en/nevibecode/by/borghei/claude-skills.md) — 120 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
