client: OneDrive and Sharepoint Online clients

Description Usage Arguments Details Value See Also Examples

Description

OneDrive and Sharepoint Online clients

Usage

1
2
3
4
5
personal_onedrive(...)

business_onedrive(tenant = "common", ...)

sharepoint_site(site_url = NULL, site_id = NULL, tenant = "common", ...)

Arguments

...

Optional arguments to be passed to AzureGraph::create_graph_login.

tenant

For business_onedrive and sharepoint_site, the name of your Azure Active Directory (AAD) tenant. If not supplied, use the default tenant for your currently logged-in account.

site_url, site_id

For sharepoint_site, the web URL and ID of the SharePoint site to retrieve. Supply one or the other, but not both.

Details

These functions provide easy access to OneDrive and SharePoint in the cloud. They work by loading your existing Microsoft Graph login, and if that isn't found, creating a new one using any arguments passed in ....

Use personal_onedrive to access the drive for your personal account, and business_onedrive to access your OneDrive for Business. For business_onedrive and sharepoint_site to work, your organisation must have an appropriate Microsoft 365 license.

The default "common" tenant for business_onedrive and sharepoint_site attempts to detect your actual tenant from your currently logged-in account. This may not always succeed, for example if you have a personal account that is also a guest account in a tenant. In this case, supply the actual tenant name.

Value

An object of class ms_drive.

See Also

ms_drive, AzureGraph::create_graph_login

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

personal_onedrive()

odb <- business_onedrive("mycompany")
odb$list_items()

site <- sharepoint_site("https://mycompany.sharepoint.com/sites/my-site-name")
site$get_drive()$list_items()


## End(Not run)

hongooi73/Microsoft365R documentation built on Jan. 12, 2021, 12:36 a.m.