Call the Microsoft Graph REST API
call_graph_endpoint(token, operation, ..., options = list(),
api_version = getOption("azure_graph_api_version"))call_graph_url(token, url, ..., http_verb = c("GET", "DELETE", "PUT",
"POST", "HEAD", "PATCH"), http_status_handler = c("stop", "warn",
"message", "pass"), auto_refresh = TRUE)
An Azure OAuth token, of class AzureToken.
The operation to perform, which will form part of the URL path.
Other arguments passed to lower-level code, ultimately to the appropriate functions in httr.
A named list giving the URL query parameters.
The API version to use, which will form part of the URL sent to the host.
A complete URL to send to the host.
The HTTP verb as a string, one of GET, PUT, POST, DELETE, HEAD or PATCH.
How to handle in R the HTTP status code of a response. "stop", "warn" or "message" will call the appropriate handlers in httr, while "pass" ignores the status code.
Whether to refresh/renew the OAuth token if it is no longer valid.
If http_status_handler is one of "stop", "warn" or "message", the status code of the response is checked. If an error is not thrown, the parsed content of the response is returned with the status code attached as the "status" attribute.
If http_status_handler is "pass", the entire response is returned without modification.
These functions form the low-level interface between R and Microsoft Graph. call_graph_endpoint forms a URL from its arguments and passes it to call_graph_url.
httr::GET, httr::PUT, httr::POST, httr::DELETE, httr::stop_for_status, httr::content