{"id":21975276,"url":"https://github.com/yaegashi/o365events","last_synced_at":"2026-05-03T09:31:40.675Z","repository":{"id":136842982,"uuid":"252821066","full_name":"yaegashi/o365events","owner":"yaegashi","description":"Office 365 calendar event exporter","archived":false,"fork":false,"pushed_at":"2020-04-04T05:37:55.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T03:25:54.899Z","etag":null,"topics":["golang","msgraph","office365"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaegashi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-03T19:26:41.000Z","updated_at":"2020-04-04T05:37:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"874fac95-e12c-48b9-86f1-46b1e2a50d00","html_url":"https://github.com/yaegashi/o365events","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegashi%2Fo365events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegashi%2Fo365events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegashi%2Fo365events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaegashi%2Fo365events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaegashi","download_url":"https://codeload.github.com/yaegashi/o365events/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245036122,"owners_count":20550661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","msgraph","office365"],"created_at":"2024-11-29T15:50:42.175Z","updated_at":"2026-05-03T09:31:40.645Z","avatar_url":"https://github.com/yaegashi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# o365events\n\n## 概要\n\nMicrosoft Graph API を使って指定した Office 365 アカウントのカレンダーにアクセスし、\nイベントと出席者のデータを Excel ないし JSON 形式で出力する CLI ツールです。\nSharePoint Online のドキュメントライブラリにアップロードすることもできます。\n\nLinux/Windows/macOS 用の実行ファイルが\n[Releases](https://github.com/yaegashi/o365events/releases)\nよりダウンロードできます。\n\n## 使用法\n\n```console\n$ o365events -h\nUsage of o365events:\n  -client-id string\n        Client ID (default \"b7dbe94f-2f3a-4b98-a372-a99d0edff196\")\n  -end string\n        End date (YYYYMMDD)\n  -exclude\n        Exclude calendar owner from attendees\n  -output string\n        Output path (default \"events.xlsx\")\n  -start string\n        Start date(YYYYMMDD) (default \"20200404\")\n  -tenant-id string\n        Tenant ID (default \"common\")\n  -token-cache-path string\n        Token cache path (default \"token_cache.json\")\n```\n\n### 認証\n\no365events を初めて実行すると次のように URL (https://microsoft.com/devicelogin) とコード (`HDZSYAKLD`) を表示します。\n\n```console\n$ o365events \nTo sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code HDZSYAKLD to authenticate.\n```\n\n指示のとおりに Web ブラウザで URL を開き、コードを入力してください。\nその後サインインを要求されますので、カレンダーにアクセス権限のあるアカウントでサインインしてください。\n\nサインインに成功するとカレントディレクトリに `token_cache.json` ファイルを作成します。\n2 回目以降の実行ではこのファイルを読み取ってユーザー認証しますのでサインインを求められることはありません。\nこのファイルは他人がアクセスできない安全な場所に保存してください。\n\n### me\n\no365events を引数なしで実行すると、\nサインインしたユーザー (`me`) の現在の月のイベントを events.xlsx ファイルに出力します。\n\n```console\n$ o365events\n2020/04/04 14:33:09 I: User me\n2020/04/04 14:33:09 I: Fetching events of admin@l0wdev.onmicrosoft.com (d2a07c12-3806-4f0b-9f86-c39d88de1c83)\n2020/04/04 14:33:10 I: Got 1 events\n2020/04/04 14:33:10 I: Writing to events.xlsx\n```\n\n### JSON 出力\n\n`-output` で拡張子が `.json` のファイル名を指定すると JSON で出力します。\n`-` を指定すると標準出力に JSON で出力します。\n\n```console\n$ o365events -output events.json\n```\n\n### 期間指定\n\n`-start` と `-end` で出力するイベントの期間を日単位で指定できます。\n\n```console\n$ o365events -start 20190401 -end 20200331\n```\n\n### 会議室\n\n会議室のイベントを出力するには、次のように会議室アカウントのメールアドレスを引数に並べます。\n会議室アカウントを出席者リストから除外するために `-exclude` を指定することを推奨します。\n\n```console\n$ o365events -start 20200401 -end 20200430 -exclude room-a@l0wdev.onmicrosoft.com room-b@l0wdev.onmicros\noft.com room-c@l0wdev.onmicrosoft.com\n2020/04/04 14:34:30 I: User room-a@l0wdev.onmicrosoft.com\n2020/04/04 14:34:30 I: Fetching events of room-a@l0wdev.onmicrosoft.com (5fc084ba-b8fb-479f-bbdc-456ea8b7880b)\n2020/04/04 14:34:31 I: Got 28 events\n2020/04/04 14:34:31 I: User room-b@l0wdev.onmicrosoft.com\n2020/04/04 14:34:31 I: Fetching events of room-b@l0wdev.onmicrosoft.com (9349a25d-9f8b-47fd-85d2-22b2a512409d)\n2020/04/04 14:34:32 I: Got 3 events\n2020/04/04 14:34:32 I: User room-c@l0wdev.onmicrosoft.com\n2020/04/04 14:34:33 I: Fetching events of room-c@l0wdev.onmicrosoft.com (85b5f7d3-47f3-4c95-978f-1d846cbaae7d)\n2020/04/04 14:34:33 I: Got 5 events\n2020/04/04 14:34:33 I: Writing to events.xlsx\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaegashi%2Fo365events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyaegashi%2Fo365events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyaegashi%2Fo365events/lists"}