/setup-m365cli.en
Lesson command — M365 CLI setup
$ npx -y skills add minicoohei/ai-agent-camp --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/setup-m365cli.en
Context preview
What this command does when you run it.
Lesson command — M365 CLI setup
Command definition
setup-m365cli.en.mddescription: "Lesson command — M365 CLI setup" duration: "~20 min" prerequisites: ["Microsoft 365 CLI (PnP CLI) account"] level: "intermediate" nonInteractiveMode: deferred tags: ["setup", "module-19"]
/setup-m365cli -- M365 CLI setup
> Drive Microsoft 365 (Outlook / SharePoint / Teams) from one CLI: `@pnp/cli-microsoft365`. Device-code auth, nothing else.
**Highlight**: No PAT required — OAuth device code only
Setup steps
1. Confirm Node.js 18+ — `node -v`
2. Install @pnp/cli-microsoft365 (pinned) — `npm install -g @pnp/cli-microsoft365@7.x`
3. Sign in via device code
m365 login # Open the printed URL in your browser and enter the code
4. Verify — `m365 status`
Gotchas
- Avoid running `m365 logout` if you want to stay signed in — the token persists until it expires
- On WSL, open the URL in your Windows browser (the CLI doesn't auto-launch a browser there)
Non-interactive mode
Browser interaction is required, so `-p` mode runs only the read-only checks then writes a `setup-resume.md` and exits.
Related slides
- aiagent-course Module 19: see slide deck for the full visual walkthrough
AI Agent Training for Non-Engineers - Complete Guide to Claude Code / Cursor / Codex ### ⚠️ Before you clone Official repository (maintained by the authors): Running AI agents from this repo grants them shell, file-write, and external-API permissions on your
Other commands on ai-agent-camp.
- /check-setup.en
Top-level alias — see lesson/check-setup.en.md for the full body.
Open command - /check-setup.es
Alias de nivel superior — el cuerpo completo está en lesson/check-setup.es.md.
Open command - /check-setup
Top-level alias — see lesson/check-setup.md for the full body.
Open command - /check-security.en
Lesson command
Open command - /check-security.es
Lesson command
Open command - /check-security
Lesson command
Open command

