Skip to content
Documentation
Command

/setup-m365cli

Lesson command — M365 CLI セットアップ

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

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
@minicoohei
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

349101 skills8 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
349
Star history of minicoohei/ai-agent-camp on GitHub, a chart by star-history.com

Other commands on ai-agent-camp.

More commands from other plugins.