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

ms_team

Microsoft Teams team


Description

Class representing a team in Microsoft Teams.

Format

An R6 object of class ms_team, inheriting from ms_object.

Fields

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

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

  • type: Always "team" for a team object.

  • properties: The team properties.

Methods

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

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

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

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

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

  • list_channels(filter=NULL): List the channels for this team. Optionally, supply an OData expression to filter the list.

  • get_channel(channel_name, channel_id): Retrieve a channel. If the name and ID are not specified, returns the primary channel.

  • create_channel(channel_name, description, membership): Create a new channel. Optionally, you can specify a short text description of the channel, and the type of membership: either standard or private (invitation-only).

  • delete_channel(channel_name, channel_id, confirm=TRUE): Delete a channel; by default, ask for confirmation first. You cannot delete the primary channel of a team. Note that Teams keeps track of all channels ever created, even if you delete them (you can see the deleted channels by going to the "Manage team" pane for a team, then the "Channels" tab, and expanding the "Deleted" entry); therefore, try not to create and delete channels unnecessarily.

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

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

  • get_sharepoint_site(): Get the SharePoint site associated with the team.

  • get_group(): Retrieve the Microsoft 365 group associated with the team.

Initialization

Creating new objects of this class should be done via the get_team and list_teams methods of the ms_graph, az_user 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 team.

See Also

Examples

## Not run: 

myteam <- get_team("my team")
myteam$list_channels()
myteam$get_channel()
myteam$get_drive()

myteam$create_channel("Test channel", description="A channel for testing")
myteam$delete_channel("Test channel")


## 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.