{"id":25461389,"url":"https://github.com/cloudeteer/m365-exporter","last_synced_at":"2026-01-28T12:22:08.836Z","repository":{"id":274219250,"uuid":"921706695","full_name":"cloudeteer/m365-exporter","owner":"cloudeteer","description":"Microsoft 365 prometheus exporter","archived":false,"fork":false,"pushed_at":"2025-02-15T17:36:09.000Z","size":60,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-15T18:31:26.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudeteer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2025-01-24T13:12:59.000Z","updated_at":"2025-02-12T15:37:13.000Z","dependencies_parsed_at":"2025-02-15T18:24:42.962Z","dependency_job_id":"2dd666ef-f900-49cc-820a-63e7360fd99d","html_url":"https://github.com/cloudeteer/m365-exporter","commit_stats":null,"previous_names":["cloudeteer/m365-exporter"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudeteer%2Fm365-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudeteer%2Fm365-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudeteer%2Fm365-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudeteer%2Fm365-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudeteer","download_url":"https://codeload.github.com/cloudeteer/m365-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239416417,"owners_count":19634920,"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":[],"created_at":"2025-02-18T05:29:34.962Z","updated_at":"2026-01-28T12:22:08.823Z","avatar_url":"https://github.com/cloudeteer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/sources/assets/logo_m365_exporter.svg\" alt=\"m365-exporter logo\" height=\"120px\"\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/cloudeteer/m365-exporter/actions?query=workflow%3ACI\"\u003e\u003cimg src=\"https://github.com/cloudeteer/m365-exporter/workflows/CI/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/cloudeteer/m365-exporter/blob/master/LICENSE.txt\"\u003e\u003cimg src=\"https://img.shields.io/github/license/cloudeteer/m365-exporter\" alt=\"GitHub license\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/cloudeteer/m365-exporter/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/cloudeteer/m365-exporter.svg?logo=github\" alt=\"Current Release\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/cloudeteer/m365-exporter/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/cloudeteer/m365-exporter?style=flat\u0026logo=github\" alt=\"GitHub Repo stars\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/cloudeteer/m365-exporter/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/downloads/cloudeteer/m365-exporter/total?logo=github\" alt=\"GitHub all releases\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/cloudeteer/m365-exporter\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/cloudeteer/m365-exporter\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n---\n\n\u003e [!NOTE]\n\u003e This repository is publicly accessible as part of our open-source initiative.\n\u003e We welcome contributions from the community alongside our organization's primary development efforts.\n\n---\n\n# m365-exporter\n\n## About\n\nA Microsoft 365 exporter for Prometheus metrics.\nThe exporter uses the Microsoft Graph API to collect metrics about Microsoft 365 services\nand exports them in a format that can be scraped by Prometheus.\n\n### Collectors\n\nThe following collectors are implemented:\n\n| Name                                             | Description             |\n|--------------------------------------------------|-------------------------|\n| [adsync](docs/collector.adsync.md)               | Entra ID Connect Health |\n| [exchange](docs/collector.exchange.md)           | Exchange Online metrics |\n| [intune](docs/collector.intune.md)               | Intune devices          |\n| [license](docs/collector.license.md)             | Licenses usage          |\n| [onedrive](docs/collector.license.md)            | Onedrive usage          |\n| [securescore](docs/collector.securescore.md)     | Securescore             |\n| [servicehealth](docs/collector.servicehealth.md) | Service Health          |\n| [teams](docs/collector.teams.md)                 | Teams                   |\n| [sharepoint](docs/collector.sharepoint.md)       | Sharepoint              |\n\n## Installation\n\n### Single binary\n\nDownload the latest release from the [release page](https://github.com/cloudeteer/m365-exporter/releases/).\n\n## Docker\n\nA Docker image exists on [GitHub container registry](https://github.com/cloudeteer/m365-exporter/pkgs/container/m365-exporter).\n\nTags:\n\n* `ghcr.io/cloudeteer/m365-exporter:\u003cVERSION\u003e`\n\n## Configuration\n\n### MS Graph Permissions\n\nThe exporter requires the following permissions to be set in the Entra ID app registration as Application permissions:\n\n- DeviceManagementConfiguration.Read.All\n- DeviceManagementManagedDevices.Read.All\n- DeviceManagementServiceConfig.Read.All\n- Directory.Read.All\n- Files.Read.All\n- Organization.Read.All\n- SecurityEvents.Read.All\n- ServiceHealth.Read.All\n- Sites.Read.All\n- TeamSettings.Read.All\n- User.Read.All\n\nKeep in mind, after granting the permissions, the administrator must consent to them.\n\n### Exchange API Permissions\n\nThe exporter requires the following permissions to be set in the Entra ID app registration as Application permissions for the `Office 365 Exchange Online` App:\n\n* Exchange.ManageAsApp\n\nAlso, the directory role `Secruity Reader` or `Global Reader` must be granted.\n\nRef: https://learn.microsoft.com/en-us/powershell/exchange/connect-exo-powershell-managed-identity?view=exchange-ps\n\n### Entra ID Connect Health\n\nPermissions for Entra ID Connect Health must be set in the on the Entra ID Connect Health page via permissions.\nThe `Read` permission is required.\n\n### Sharepoint API Permissions\n\nThe exporter requires the following permissions to be set in the Entra ID app registration as Application permissions for the `Office 365 SharePoint Online` App:\n\n* Sites.FullControl.All\n\n### Via config file\n\nBy default, the exporter will search in `/etc/m365-exporter/` a file named `m365-exporter-config.yaml`, alternatively the file can be placed\nin the current working directory of the program. It’s possible to set a specific location of the config file via setting\nthe `M365_CONFIGFILE` environment variable.\n\nA fully fledged example config file can be found in the [docs folder](docs/m365-exporter-config.yaml).\n\n| Config Parameter                          | Info                                                                                                 |\n|-------------------------------------------|------------------------------------------------------------------------------------------------------|\n| `settings.loglevel`                       | Possible values are \"panic\",\"fatal\",\"error\",\"warning\",\"info\",\"debug\" and \"trace\". Default is \"info\". |\n| `settings.serviceHealthStatusRefreshRate` | Refresh rate of service health status in minutes. Only Integers allowed. Default is 5 minutes.       |\n| `settings.serviceHealthIssueKeepDays`     | Setting how long an Incident or Advisory should be kept as resolved in the metrics.                  |\n| `onedrive.scrambleNames`                  | `bool` whether the label for individual onedrive metrics should have a scrambled version of the UPN  |\n| `onedrive.scrambleSalt`                   | Set the salt to scramble the UPNs, a default value is set, so UPN hashes are always salted           |\n\nEach collector can be disabled using this schema:\n\n```yaml\noneDrive:\n  enabled: false\nteams:\n  enabled: true\nadsync:\n  enabled: true\nexchange:\n  enabled: true\nsecurescore:\n  enabled: true\nlicense:\n  enabled: true\nservicehealth:\n  enabled: true\nintune:\n  enabled: true\nentraid:\n  enabled: true\nsharepoint:\n  enabled: true\n```\n\n### Via environment variables\n\nEnvironment variables can be used to set configuration parameters. If a parameter is set via the environment, it takes precedence over\nthe settings in the config file.\n\nThe environment variable names correspond to a key in the YAML file,\nby prefixing it with `M365_` and where the `.`s are replaced by `_`.\n`M365_SERVER_HOST` set the `server.host` parameter in the YAML file.\n\n\u003e [!CAUTION]\n\u003e The config provider can’t handle boolean values passed through the environment.\n\n### Authentication\n\nm365-exporter supports all authentication supported by Azure SDK for Go.\n\n#### Service principal with a secret\n\n| Variable name         | Value                                        |\n|-----------------------|----------------------------------------------|\n| `AZURE_CLIENT_ID`     | Application ID of an Azure service principal |\n| `AZURE_TENANT_ID`     | ID of the application's Azure AD tenant      |\n| `AZURE_CLIENT_SECRET` | Password of the Azure service principal      |\n\n#### Service principal with certificate\n\n| Variable name                   | Value                                                                          |\n|---------------------------------|--------------------------------------------------------------------------------|\n| `AZURE_CLIENT_ID`               | Application ID of an Azure service principal                                   |\n| `AZURE_TENANT_ID`               | ID of the application's Azure AD tenant                                        |\n| `AZURE_CLIENT_CERTIFICATE_PATH` | Path to a certificate file including private key (without password protection) |\n\n#### Use a managed identity\n\n| Variable name     | Value                                                                              |\n|-------------------|------------------------------------------------------------------------------------|\n| `AZURE_CLIENT_ID` | User-assigned managed client ID. Can be avoid, if a system assign identity is used |\n| `AZURE_TENANT_ID` | ID of the application's Azure AD tenant                                            |\n\n## Supporting documentation\n\n- [graph API reference](https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0) (includes required permissions)\n- [pagination](https://docs.microsoft.com/en-us/graph/sdks/paging?tabs=Go)\n- [Graph API Explorer](https://developer.microsoft.com/en-us/graph/graph-explorer) (look up API endpoints, and their required permissions)\n\n## Building\n\nRun `make help` to see available make targets.\n\nTo contribute to the project, refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n## Commercial support\n\nFor commercial support, contact [Cloudeteer](https://www.cloudeteer.de/contact).\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudeteer%2Fm365-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudeteer%2Fm365-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudeteer%2Fm365-exporter/lists"}