Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ms_site

Office 365 SharePoint site


Description

Class representing a SharePoint site.

Format

An R6 object of class ms_site, inheriting from ms_object.

Fields

  • token: The token used to authenticate with the Graph host.

  • tenant: The Azure Active Directory tenant for this site.

  • type: always "site" for a site object.

  • properties: The site properties.

Methods

  • new(...): Initialize a new site object. Do not call this directly; see 'Initialization' below.

  • delete(confirm=TRUE): Delete a site. By default, ask for confirmation first.

  • update(...): Update the site metadata in Microsoft Graph.

  • do_operation(...): Carry out an arbitrary operation on the site.

  • sync_fields(): Synchronise the R object with the site metadata in Microsoft Graph.

  • list_drives(): List the drives (shared document libraries) associated with this site.

  • get_drive(drive_id): Retrieve a shared document library for this site. If the ID is not specified, this returns the default document library.

  • list_subsites(): List the subsites of this site.

  • get_lists(): Returns the lists that are part of this site.

  • get_list(list_name, list_id): Returns a specific list, either by name or ID.

  • get_group(): Retrieve the Microsoft 365 group associated with the site, if it exists. A site that backs a private Teams channel will not have a group associated with it.

Initialization

Creating new objects of this class should be done via the get_sharepoint_site method of the ms_graph or az_group classes. Calling the new() method for this class only constructs the R object; it does not call the Microsoft Graph API to retrieve or create the actual site.

See Also

Examples

## Not run: 

site <- get_sharepoint_site("My site")
site$list_drives()
site$get_drive()


## End(Not run)

Microsoft365R

Interface to the 'Microsoft 365' Suite of Cloud Services

v2.1.0
MIT + file LICENSE
Authors
Hong Ooi [aut, cre], Microsoft [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.