Skip to content
Documentation
Command

/setup-m365cli

Lesson command — M365 CLI セットアップ

From plugin
ai-agent-camp
345200 skills8 agents200 commands
Install
$ npx -y skills add minicoohei/ai-agent-camp --agent claude-code

How 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

Context preview

What this command does when you run it.

Lesson command — M365 CLI セットアップ

Command definition

setup-m365cli.md
description: "Lesson command — M365 CLI セットアップ"
duration: "約20分"
prerequisites: ["Microsoft 365 CLI (PnP CLI) アカウント"]
level: "intermediate"
nonInteractiveMode: deferred
tags: ["setup", "module-19"]

/setup-m365cli -- M365 CLI セットアップ

> Microsoft 365 (Outlook / SharePoint / Teams) を CLI からまとめて触る `@pnp/cli-microsoft365`。デバイスコード認証だけで完結します。

**ハイライト**: PAT 不要・OAuth デバイスコードのみ

セットアップ手順

1. Node.js 18+ を確認 — `node -v`

2. @pnp/cli-microsoft365 を pin install — `npm install -g @pnp/cli-microsoft365@7.x`

3. デバイスコードでログイン

   m365 login
# 出力された URL をブラウザで開いてコードを入力

4. 接続確認 — `m365 status`

つまずきポイント

  • ログインしたままにするには `m365 logout` を実行しないこと(Token 失効まで保持)
  • WSL 環境では `m365 login` 出力 URL を Windows ブラウザで開く必要あり(自動 open は呼ばない)

非対話モード

ブラウザ操作と入力が必要なので、`claude -p` 実行時は読み取り系チェックのみ実施し、`setup-resume.md` を生成して終了します。

関連スライド

  • aiagent-course Module 19: see slide deck for the full visual walkthrough
Ships withai-agent-camp

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

Get the whole plugin