mgcのインストールとお試し
public.icon
mgcのインストールとお試し
login時に、scopes指定が無いとmgc me getも失敗する
🤖
Microsoft Graph CLIでTODOにアクセスする方法
準備と認証
1. インストール
2. ログインcode:_
mgc login --scopes User.Read Tasks.ReadWrite
3. ユーザーID確認code:_
mgc me get
TODOリストの操作
1. リスト一覧の取得code:_
mgc me todo lists list --output table
--output tableオプションで日本語が正しく表示
2. 特定リスト内のタスク表示code:_
mgc me todo lists tasks list --list-id <リストID> --output table
3. 新しいタスクの作成code:_
mgc me todo lists tasks create --list-id <リストID> --body '{"title": "新しいタスク"}'
4. タスクを完了にするcode:_
mgc me todo lists tasks patch --list-id <リストID> --task-id <タスクID> --body '{"status": "completed"}'
その他のコマンド
ヘルプ表示code:_
mgc me todo --help
mgc me todo lists --help
mgc me todo lists tasks --help
ログアウトcode:_
mgc logout
注意点
コマンドにはmgc meまたはmgc usersを使用可能
mgc meは自分のアカウントへのショートカット
適切なスコープでのログインが必要(Tasks.ReadWrite)
日本語表示には--output tableオプションを使用
Microsoft Graph CLIは、コマンドラインからTODOタスクを管理する効率的な方法を提供しています。