{"id":14067317,"url":"https://github.com/davidski/msgraphr","last_synced_at":"2025-03-04T17:32:16.760Z","repository":{"id":148568379,"uuid":"151973950","full_name":"davidski/msgraphr","owner":"davidski","description":"📇Read Office 365 data via the MS Graph API and R","archived":false,"fork":false,"pushed_at":"2021-01-22T03:47:44.000Z","size":19,"stargazers_count":16,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-18T02:42:00.295Z","etag":null,"topics":["msgraph","office365","rstats","sharepoint-online"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidski.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"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":"2018-10-07T18:47:04.000Z","updated_at":"2023-10-30T14:01:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3582925-085a-4579-892e-ebf6cfc3cb11","html_url":"https://github.com/davidski/msgraphr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidski%2Fmsgraphr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidski%2Fmsgraphr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidski%2Fmsgraphr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidski%2Fmsgraphr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidski","download_url":"https://codeload.github.com/davidski/msgraphr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241889772,"owners_count":20037571,"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":["msgraph","office365","rstats","sharepoint-online"],"created_at":"2024-08-13T07:05:32.209Z","updated_at":"2025-03-04T17:32:16.467Z","avatar_url":"https://github.com/davidski.png","language":"R","readme":"---\noutput:\n  md_document:\n    variant: markdown_github\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n# msgraphr\n\n\u003e NOTE: This package is quite raw. I am not currently using Office 365 \nand cannot develop or debug features apart from the general \nMS Graph interface. Pull Requests are **most** welcome!\n\n**msgraphr** is a minimal R wrapper of the SharePoint Online (Office 365) \nAPIs, aiming to allow R users to pull down list information as dataframes for \nlocal analysis. Liberate your data from SharePoint!\n\n## Installation\n\n\n`devtools::install_github(\"davidski/msgraphr\")`\n\n## Authentication\n\n * Create an application at https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade with the following fields:\n  + `Name` Name of your MS Graph app e.g. `msgraphr_query`.\n  + Under `Redirect URIs` at a web link pointing to `http://localhost:1410`.\n  + Take note of the `Application Id`, this will be your `client_id`.\n  + Under `Certificates \u0026 Secrets` generate an application secret and note the \n    value for use as the `Client Secret`.\n  + Add a Platform and select `Web`.\n    + `Allow Implicit Flow`: Unchecked\n  + Under API Permissions, alter the Microsoft Graph permissions to \n    specify the scopes for which you wish to grant access.\n  \n* (OPTIONAL, BUT RECOMMENDED) Set the `MSGRAPH_PAT` environment variable to a \n  file location on disk for `msgraphr` to cache the Oauth2.0 token. Defaults \n  to the current working directory.\n\n* To perform the initial authentication.\n  ```\n  msgraph_auth(client_id = \"REDACTED\", \n               client_secret = \"REDACTED\" )\n  ```\n  \n### Scope used\n\n* `msgraphr` requests the following access scopes:\n  + `User` and `Sites.Read.All` for SharePoint online read access\n  + `offline_user` so that tokens may be auto-refreshed without further user action\n\n## Usage\n\n```{r example, eval = FALSE}\nlibrary(tidyverse)\nlibrary(msgraphr)\n\n# auth\ntoken \u003c- msgraph_auth()\n\n# list all the sites to which you have accesss\nget_sites(search = \"\", token) %\u003e% head(1) %\u003e% pull(id) -\u003e my_site\n\n# list all the lists on that site\nget_lists(site_id = my_site, token) %\u003e% head(1) %\u003e% pull(id) -\u003e my_list\n\n# fetch all the entries on that list\nget_list_entries(site_id = my_site, list_id = my_list, token)\n\n# go forth and do amazing things!\n```\n\n## References\n\nSee the [MS Graph](https://developer.microsoft.com/en-us/graph/docs/concepts/overview) API documentation.\n\n## Contributing\n\nPlease note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.\n\n## License\n\nThe [MIT License](LICENSE) applies.\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidski%2Fmsgraphr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidski%2Fmsgraphr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidski%2Fmsgraphr/lists"}