Class Team

java.lang.Object
com.independentsoft.graph.teams.Team
All Implemented Interfaces:
ICreatable, IUpdatable

public class Team extends Object implements ICreatable, IUpdatable
Represents a team in Microsoft Teams.

The Team resource represents a team in Microsoft Teams, which is a collection of channels for collaboration. Each team is associated with a Microsoft 365 group, and teams provide enhanced collaboration features including channels, apps, tabs, and meetings.

Key team features:

  • Channels - Dedicated sections for different topics or projects
  • Members and Owners - Role-based access control
  • Apps and Tabs - Integrate third-party services and custom apps
  • Messaging - Team conversations and chat messages
  • Meetings - Schedule and conduct online meetings
  • Files - Shared document library through SharePoint
  • Settings - Customizable team behaviors and permissions

Team specializations:

  • Standard - General-purpose teams
  • Education Class - For classroom collaboration
  • Professional Learning Community - For educator communities
  • Staff - For administrative and staff teams

Example usage:

 GraphClient client = new GraphClient();
 // ... configure authentication ...
 
 // Create a new team from a group
 Team team = new Team();
 team.setDisplayName("Engineering Team");
 team.setDescription("Software engineering collaboration");
 
 // Configure team settings
 TeamMemberSettings memberSettings = new TeamMemberSettings();
 memberSettings.setAllowCreateUpdateChannels(true);
 team.setMemberSettings(memberSettings);
 
 TeamMessagingSettings messagingSettings = new TeamMessagingSettings();
 messagingSettings.setAllowUserEditMessages(true);
 team.setMessagingSettings(messagingSettings);
 
 // Create the team
 Team createdTeam = client.createTeam(team);
 
 // Create a channel
 Channel channel = new Channel();
 channel.setDisplayName("Development");
 channel.setDescription("Development discussions");
 client.createChannel(createdTeam.getId(), channel);
 
Since:
1.0
See Also:
team resource type, Create team, Microsoft Teams API overview
  • Field Details

  • Constructor Details

    • Team

      public Team()
    • Team

      public Team(JsonObject jsonObject)
  • Method Details

    • toCreateJson

      public String toCreateJson()
      Description copied from interface: ICreatable
      Converts this object to its JSON representation for creation.

      This method generates a JSON string containing all properties needed to create a new instance of this resource in Microsoft Graph. Only properties appropriate for creation should be included (e.g., excluding read-only properties like ID, createdTime, etc.).

      Specified by:
      toCreateJson in interface ICreatable
      Returns:
      JSON string representation for creating this resource
    • toUpdateJson

      public String toUpdateJson()
      Description copied from interface: IUpdatable
      Converts this object to its JSON representation for update.

      This method generates a JSON string containing all modified properties that should be updated in Microsoft Graph. Only writeable properties with non-null values are typically included.

      Specified by:
      toUpdateJson in interface IUpdatable
      Returns:
      JSON string representation for updating this resource
    • toUpdateJson

      public String toUpdateJson(List<String> propertyNames)
      Description copied from interface: IUpdatable
      Converts this object to JSON for update with specific properties.

      This method generates a JSON string containing only the specified properties. This enables partial updates where only certain fields need to be modified, reducing payload size and avoiding unintended changes to other properties.

      Specified by:
      toUpdateJson in interface IUpdatable
      Parameters:
      propertyNames - List of property names to include in the JSON. If null or empty, all modified properties are included.
      Returns:
      JSON string representation for updating specific properties
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTemplate

      public String getTemplate()
    • setTemplate

      public void setTemplate(String template)
    • getGroup

      public String getGroup()
    • setGroup

      public void setGroup(String group)
    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getDisplayName

      public String getDisplayName()
    • setDisplayName

      public void setDisplayName(String displayName)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getClassification

      public String getClassification()
    • setClassification

      public void setClassification(String classification)
    • getSpecialization

      public TeamSpecialization getSpecialization()
    • setSpecialization

      public void setSpecialization(TeamSpecialization specialization)
    • getVisibility

      public TeamVisibilityType getVisibility()
    • setVisibility

      public void setVisibility(TeamVisibilityType visibility)
    • getFunSettings

      public TeamFunSettings getFunSettings()
    • setFunSettings

      public void setFunSettings(TeamFunSettings funSettings)
    • getGuestSettings

      public TeamGuestSettings getGuestSettings()
    • setGuestSettings

      public void setGuestSettings(TeamGuestSettings guestSettings)
    • getInternalId

      public String getInternalId()
    • setInternalId

      public void setInternalId(String internalId)
    • isArchived

      public boolean isArchived()
    • setArchived

      public void setArchived(boolean isArchived)
    • getMemberSettings

      public TeamMemberSettings getMemberSettings()
    • setMemberSettings

      public void setMemberSettings(TeamMemberSettings memberSettings)
    • getMessagingSettings

      public TeamMessagingSettings getMessagingSettings()
    • setMessagingSettings

      public void setMessagingSettings(TeamMessagingSettings messagingSettings)
    • getDiscoverySettings

      public TeamDiscoverySettings getDiscoverySettings()
    • setDiscoverySettings

      public void setDiscoverySettings(TeamDiscoverySettings discoverySettings)
    • getWebUrl

      public String getWebUrl()
    • getClassSettings

      public TeamClassSettings getClassSettings()
    • setClassSettings

      public void setClassSettings(TeamClassSettings classSettings)
    • isMembershipLimitedToOwners

      public boolean isMembershipLimitedToOwners()
    • setMembershipLimitedToOwners

      public void setMembershipLimitedToOwners(boolean isMembershipLimitedToOwners)
    • getCreatedTime

      public Date getCreatedTime()
    • getSummary

      public TeamSummary getSummary()
    • getTenantId

      public String getTenantId()
    • getMembers

      public List<ConversationMember> getMembers()