MSGraph: MSGraph

Description Usage Arguments Details Value Examples

Description

Simple, flexible REST API calls to MS Office Graph

Usage

1
2
3
4
5
6
MSGraph(
  query = "",
  handle_pagination = TRUE,
  reset_token = FALSE,
  assign_responses = FALSE
)

Arguments

query

The full URL for the query to send to the MS Office Graph or SharePoint API

handle_pagination

Defaults to TRUE to automatically continue requesting until all data has been received

reset_token

Option to manually reset your access token

assign_responses

Option to also assign the response to your global environment as the variable MSGraph_latestResponse. This is helpful for debugging if your response is not what you expected, or if you want to have the option to interrupt the operation while keeping as much data as has been received up to that point.

Details

This function allows R to send normally constructed MS Office Graph queries and return the response as a simple data.frame.

For more information about how to construct queries, see the Office Graph Developer Demo: https://developer.microsoft.com/en-us/graph/graph-explorer

To further refine your queries, see the OData documentation: https://www.odata.org/documentation/

Value

A data.frame with the complete, pagerized response to your query.

Examples

1
2
3
4
5
6
User_IDs <- MSGraph("https://graph.microsoft.com/v1.0/users?$select=id")


You can use pipes for a clearer view of your queries:

User_IDs <- "https://graph.microsoft.com/v1.0/users?$select=id" %>% MSGraph()

brendan-newlon/msapi documentation built on April 20, 2020, 1:57 a.m.