POST https://graph.microsoft.com/beta/teams
Content-Type: application/json
{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
"displayName": "My Sample Team",
"description": "My Sample Team’s Description"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
DisplayName = "My Sample Team",
Description = "My Sample Team’s Description",
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('standard')"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/teamsTemplates('standard')"));
team.displayName = "My Sample Team";
team.description = "My Sample Team’s Description";
graphClient.teams()
.buildRequest()
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewTeam()
displayName := "My Sample Team"
requestBody.SetDisplayName(&displayName)
description := "My Sample Team’s Description"
requestBody.SetDescription(&description)
requestBody.SetAdditionalData(map[string]interface{}{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
}
options := &msgraphsdk.TeamsRequestBuilderPostOptions{
Body: requestBody,
}
result, err := graphClient.Teams().Post(options)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
DisplayName = "My Sample Team",
Description = "My Sample Team’s Description",
Members = new TeamMembersCollectionPage()
{
new AadUserConversationMember
{
Roles = new List<String>()
{
"owner"
},
AdditionalData = new Dictionary<string, object>()
{
{"user@odata.bind", "https://graph.microsoft.com/beta/users('0040b377-61d8-43db-94f5-81374122dc7e')"}
}
}
},
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('standard')"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/teamsTemplates('standard')"));
team.displayName = "My Sample Team";
team.description = "My Sample Team’s Description";
LinkedList<ConversationMember> membersList = new LinkedList<ConversationMember>();
AadUserConversationMember members = new AadUserConversationMember();
LinkedList<String> rolesList = new LinkedList<String>();
rolesList.add("owner");
members.roles = rolesList;
members.additionalDataManager().put("user@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/users('0040b377-61d8-43db-94f5-81374122dc7e')"));
membersList.add(members);
ConversationMemberCollectionResponse conversationMemberCollectionResponse = new ConversationMemberCollectionResponse();
conversationMemberCollectionResponse.value = membersList;
ConversationMemberCollectionPage conversationMemberCollectionPage = new ConversationMemberCollectionPage(conversationMemberCollectionResponse, null);
team.members = conversationMemberCollectionPage;
graphClient.teams()
.buildRequest()
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewTeam()
displayName := "My Sample Team"
requestBody.SetDisplayName(&displayName)
description := "My Sample Team’s Description"
requestBody.SetDescription(&description)
requestBody.SetMembers( []ConversationMember {
msgraphsdk.NewConversationMember(),
SetRoles( []String {
"owner",
}
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.aadUserConversationMember",
"user@odata.bind": "https://graph.microsoft.com/beta/users('0040b377-61d8-43db-94f5-81374122dc7e')",
}
}
requestBody.SetAdditionalData(map[string]interface{}{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
}
result, err := graphClient.Teams().Post(requestBody)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
POST https://graph.microsoft.com/beta/teams
Content-Type: application/json
{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
"visibility": "Private",
"displayName": "Sample Engineering Team",
"description": "This is a sample engineering team, used to showcase the range of properties supported by this API",
"channels": [
{
"displayName": "Announcements 📢",
"isFavoriteByDefault": true,
"description": "This is a sample announcements channel that is favorited by default. Use this channel to make important team, product, and service announcements."
},
{
"displayName": "Training 🏋️",
"isFavoriteByDefault": true,
"description": "This is a sample training channel, that is favorited by default, and contains an example of pinned website and YouTube tabs.",
"tabs": [
{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.web')",
"displayName": "A Pinned Website",
"configuration": {
"contentUrl": "https://docs.microsoft.com/microsoftteams/microsoft-teams"
}
},
{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.youtube')",
"displayName": "A Pinned YouTube Video",
"configuration": {
"contentUrl": "https://tabs.teams.microsoft.com/Youtube/Home/YoutubeTab?videoId=X8krAMdGvCQ",
"websiteUrl": "https://www.youtube.com/watch?v=X8krAMdGvCQ"
}
}
]
},
{
"displayName": "Planning 📅 ",
"description": "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu.",
"isFavoriteByDefault": false
},
{
"displayName": "Issues and Feedback 🐞",
"description": "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu."
}
],
"memberSettings": {
"allowCreateUpdateChannels": true,
"allowDeleteChannels": true,
"allowAddRemoveApps": true,
"allowCreateUpdateRemoveTabs": true,
"allowCreateUpdateRemoveConnectors": true
},
"guestSettings": {
"allowCreateUpdateChannels": false,
"allowDeleteChannels": false
},
"funSettings": {
"allowGiphy": true,
"giphyContentRating": "Moderate",
"allowStickersAndMemes": true,
"allowCustomMemes": true
},
"messagingSettings": {
"allowUserEditMessages": true,
"allowUserDeleteMessages": true,
"allowOwnerDeleteMessages": true,
"allowTeamMentions": true,
"allowChannelMentions": true
},
"discoverySettings": {
"showInTeamsSearchAndSuggestions": true
},
"installedApps": [
{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')"
},
{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')"
}
]
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
Visibility = TeamVisibilityType.Private,
DisplayName = "Sample Engineering Team",
Description = "This is a sample engineering team, used to showcase the range of properties supported by this API",
Channels = new TeamChannelsCollectionPage()
{
new Channel
{
DisplayName = "Announcements 📢",
IsFavoriteByDefault = true,
Description = "This is a sample announcements channel that is favorited by default. Use this channel to make important team, product, and service announcements."
},
new Channel
{
DisplayName = "Training 🏋️",
IsFavoriteByDefault = true,
Description = "This is a sample training channel, that is favorited by default, and contains an example of pinned website and YouTube tabs.",
Tabs = new ChannelTabsCollectionPage()
{
new TeamsTab
{
DisplayName = "A Pinned Website",
Configuration = new TeamsTabConfiguration
{
ContentUrl = "https://docs.microsoft.com/microsoftteams/microsoft-teams"
},
AdditionalData = new Dictionary<string, object>()
{
{"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.web')"}
}
},
new TeamsTab
{
DisplayName = "A Pinned YouTube Video",
Configuration = new TeamsTabConfiguration
{
ContentUrl = "https://tabs.teams.microsoft.com/Youtube/Home/YoutubeTab?videoId=X8krAMdGvCQ",
WebsiteUrl = "https://www.youtube.com/watch?v=X8krAMdGvCQ"
},
AdditionalData = new Dictionary<string, object>()
{
{"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.youtube')"}
}
}
}
},
new Channel
{
DisplayName = "Planning 📅 ",
Description = "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu.",
IsFavoriteByDefault = false
},
new Channel
{
DisplayName = "Issues and Feedback 🐞",
Description = "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu."
}
},
MemberSettings = new TeamMemberSettings
{
AllowCreateUpdateChannels = true,
AllowDeleteChannels = true,
AllowAddRemoveApps = true,
AllowCreateUpdateRemoveTabs = true,
AllowCreateUpdateRemoveConnectors = true
},
GuestSettings = new TeamGuestSettings
{
AllowCreateUpdateChannels = false,
AllowDeleteChannels = false
},
FunSettings = new TeamFunSettings
{
AllowGiphy = true,
GiphyContentRating = GiphyRatingType.Moderate,
AllowStickersAndMemes = true,
AllowCustomMemes = true
},
MessagingSettings = new TeamMessagingSettings
{
AllowUserEditMessages = true,
AllowUserDeleteMessages = true,
AllowOwnerDeleteMessages = true,
AllowTeamMentions = true,
AllowChannelMentions = true
},
DiscoverySettings = new TeamDiscoverySettings
{
ShowInTeamsSearchAndSuggestions = true
},
InstalledApps = new TeamInstalledAppsCollectionPage()
{
new TeamsAppInstallation
{
AdditionalData = new Dictionary<string, object>()
{
{"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')"}
}
},
new TeamsAppInstallation
{
AdditionalData = new Dictionary<string, object>()
{
{"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')"}
}
}
},
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('standard')"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const team = {
'template@odata.bind': 'https://graph.microsoft.com/beta/teamsTemplates(\'standard\')',
visibility: 'Private',
displayName: 'Sample Engineering Team',
description: 'This is a sample engineering team, used to showcase the range of properties supported by this API',
channels: [
{
displayName: 'Announcements 📢',
isFavoriteByDefault: true,
description: 'This is a sample announcements channel that is favorited by default. Use this channel to make important team, product, and service announcements.'
},
{
displayName: 'Training 🏋️',
isFavoriteByDefault: true,
description: 'This is a sample training channel, that is favorited by default, and contains an example of pinned website and YouTube tabs.',
tabs: [
{
'teamsApp@odata.bind': 'https://graph.microsoft.com/v1.0/appCatalogs/teamsApps(\'com.microsoft.teamspace.tab.web\')',
displayName: 'A Pinned Website',
configuration: {
contentUrl: 'https://docs.microsoft.com/microsoftteams/microsoft-teams'
}
},
{
'teamsApp@odata.bind': 'https://graph.microsoft.com/v1.0/appCatalogs/teamsApps(\'com.microsoft.teamspace.tab.youtube\')',
displayName: 'A Pinned YouTube Video',
configuration: {
contentUrl: 'https://tabs.teams.microsoft.com/Youtube/Home/YoutubeTab?videoId=X8krAMdGvCQ',
websiteUrl: 'https://www.youtube.com/watch?v=X8krAMdGvCQ'
}
}
]
},
{
displayName: 'Planning 📅 ',
description: 'This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu.',
isFavoriteByDefault: false
},
{
displayName: 'Issues and Feedback 🐞',
description: 'This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu.'
}
],
memberSettings: {
allowCreateUpdateChannels: true,
allowDeleteChannels: true,
allowAddRemoveApps: true,
allowCreateUpdateRemoveTabs: true,
allowCreateUpdateRemoveConnectors: true
},
guestSettings: {
allowCreateUpdateChannels: false,
allowDeleteChannels: false
},
funSettings: {
allowGiphy: true,
giphyContentRating: 'Moderate',
allowStickersAndMemes: true,
allowCustomMemes: true
},
messagingSettings: {
allowUserEditMessages: true,
allowUserDeleteMessages: true,
allowOwnerDeleteMessages: true,
allowTeamMentions: true,
allowChannelMentions: true
},
discoverySettings: {
showInTeamsSearchAndSuggestions: true
},
installedApps: [
{
'teamsApp@odata.bind': 'https://graph.microsoft.com/v1.0/appCatalogs/teamsApps(\'com.microsoft.teamspace.tab.vsts\')'
},
{
'teamsApp@odata.bind': 'https://graph.microsoft.com/v1.0/appCatalogs/teamsApps(\'1542629c-01b3-4a6d-8f76-1938b779e48d\')'
}
]
};
await client.api('/teams')
.version('beta')
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/teams"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphTeam *team = [[MSGraphTeam alloc] init];
[team setVisibility: [MSGraphTeamVisibilityType private]];
[team setDisplayName:@"Sample Engineering Team"];
[team setDescription:@"This is a sample engineering team, used to showcase the range of properties supported by this API"];
NSMutableArray *channelsList = [[NSMutableArray alloc] init];
MSGraphChannel *channels = [[MSGraphChannel alloc] init];
[channels setDisplayName:@"Announcements 📢"];
[channels setIsFavoriteByDefault: true];
[channels setDescription:@"This is a sample announcements channel that is favorited by default. Use this channel to make important team, product, and service announcements."];
[channelsList addObject: channels];
MSGraphChannel *channels = [[MSGraphChannel alloc] init];
[channels setDisplayName:@"Training 🏋️"];
[channels setIsFavoriteByDefault: true];
[channels setDescription:@"This is a sample training channel, that is favorited by default, and contains an example of pinned website and YouTube tabs."];
NSMutableArray *tabsList = [[NSMutableArray alloc] init];
MSGraphTeamsTab *tabs = [[MSGraphTeamsTab alloc] init];
[tabs setDisplayName:@"A Pinned Website"];
MSGraphTeamsTabConfiguration *configuration = [[MSGraphTeamsTabConfiguration alloc] init];
[configuration setContentUrl:@"https://docs.microsoft.com/microsoftteams/microsoft-teams"];
[tabs setConfiguration:configuration];
[tabsList addObject: tabs];
MSGraphTeamsTab *tabs = [[MSGraphTeamsTab alloc] init];
[tabs setDisplayName:@"A Pinned YouTube Video"];
MSGraphTeamsTabConfiguration *configuration = [[MSGraphTeamsTabConfiguration alloc] init];
[configuration setContentUrl:@"https://tabs.teams.microsoft.com/Youtube/Home/YoutubeTab?videoId=X8krAMdGvCQ"];
[configuration setWebsiteUrl:@"https://www.youtube.com/watch?v=X8krAMdGvCQ"];
[tabs setConfiguration:configuration];
[tabsList addObject: tabs];
[channels setTabs:tabsList];
[channelsList addObject: channels];
MSGraphChannel *channels = [[MSGraphChannel alloc] init];
[channels setDisplayName:@"Planning 📅 "];
[channels setDescription:@"This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu."];
[channels setIsFavoriteByDefault: false];
[channelsList addObject: channels];
MSGraphChannel *channels = [[MSGraphChannel alloc] init];
[channels setDisplayName:@"Issues and Feedback 🐞"];
[channels setDescription:@"This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu."];
[channelsList addObject: channels];
[team setChannels:channelsList];
MSGraphTeamMemberSettings *memberSettings = [[MSGraphTeamMemberSettings alloc] init];
[memberSettings setAllowCreateUpdateChannels: true];
[memberSettings setAllowDeleteChannels: true];
[memberSettings setAllowAddRemoveApps: true];
[memberSettings setAllowCreateUpdateRemoveTabs: true];
[memberSettings setAllowCreateUpdateRemoveConnectors: true];
[team setMemberSettings:memberSettings];
MSGraphTeamGuestSettings *guestSettings = [[MSGraphTeamGuestSettings alloc] init];
[guestSettings setAllowCreateUpdateChannels: false];
[guestSettings setAllowDeleteChannels: false];
[team setGuestSettings:guestSettings];
MSGraphTeamFunSettings *funSettings = [[MSGraphTeamFunSettings alloc] init];
[funSettings setAllowGiphy: true];
[funSettings setGiphyContentRating: [MSGraphGiphyRatingType moderate]];
[funSettings setAllowStickersAndMemes: true];
[funSettings setAllowCustomMemes: true];
[team setFunSettings:funSettings];
MSGraphTeamMessagingSettings *messagingSettings = [[MSGraphTeamMessagingSettings alloc] init];
[messagingSettings setAllowUserEditMessages: true];
[messagingSettings setAllowUserDeleteMessages: true];
[messagingSettings setAllowOwnerDeleteMessages: true];
[messagingSettings setAllowTeamMentions: true];
[messagingSettings setAllowChannelMentions: true];
[team setMessagingSettings:messagingSettings];
MSGraphTeamDiscoverySettings *discoverySettings = [[MSGraphTeamDiscoverySettings alloc] init];
[discoverySettings setShowInTeamsSearchAndSuggestions: true];
[team setDiscoverySettings:discoverySettings];
NSMutableArray *installedAppsList = [[NSMutableArray alloc] init];
MSGraphTeamsAppInstallation *installedApps = [[MSGraphTeamsAppInstallation alloc] init];
[installedAppsList addObject: installedApps];
MSGraphTeamsAppInstallation *installedApps = [[MSGraphTeamsAppInstallation alloc] init];
[installedAppsList addObject: installedApps];
[team setInstalledApps:installedAppsList];
NSError *error;
NSData *teamData = [team getSerializedDataWithError:&error];
[urlRequest setHTTPBody:teamData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/teamsTemplates('standard')"));
team.visibility = TeamVisibilityType.PRIVATE;
team.displayName = "Sample Engineering Team";
team.description = "This is a sample engineering team, used to showcase the range of properties supported by this API";
LinkedList<Channel> channelsList = new LinkedList<Channel>();
Channel channels = new Channel();
channels.displayName = "Announcements 📢";
channels.isFavoriteByDefault = true;
channels.description = "This is a sample announcements channel that is favorited by default. Use this channel to make important team, product, and service announcements.";
channelsList.add(channels);
Channel channels1 = new Channel();
channels1.displayName = "Training 🏋️";
channels1.isFavoriteByDefault = true;
channels1.description = "This is a sample training channel, that is favorited by default, and contains an example of pinned website and YouTube tabs.";
LinkedList<TeamsTab> tabsList = new LinkedList<TeamsTab>();
TeamsTab tabs = new TeamsTab();
tabs.additionalDataManager().put("teamsApp@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.web')"));
tabs.displayName = "A Pinned Website";
TeamsTabConfiguration configuration = new TeamsTabConfiguration();
configuration.contentUrl = "https://docs.microsoft.com/microsoftteams/microsoft-teams";
tabs.configuration = configuration;
tabsList.add(tabs);
TeamsTab tabs1 = new TeamsTab();
tabs1.additionalDataManager().put("teamsApp@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.youtube')"));
tabs1.displayName = "A Pinned YouTube Video";
TeamsTabConfiguration configuration1 = new TeamsTabConfiguration();
configuration1.contentUrl = "https://tabs.teams.microsoft.com/Youtube/Home/YoutubeTab?videoId=X8krAMdGvCQ";
configuration1.websiteUrl = "https://www.youtube.com/watch?v=X8krAMdGvCQ";
tabs1.configuration = configuration1;
tabsList.add(tabs1);
TeamsTabCollectionResponse teamsTabCollectionResponse = new TeamsTabCollectionResponse();
teamsTabCollectionResponse.value = tabsList;
TeamsTabCollectionPage teamsTabCollectionPage = new TeamsTabCollectionPage(teamsTabCollectionResponse, null);
channels1.tabs = teamsTabCollectionPage;
channelsList.add(channels1);
Channel channels2 = new Channel();
channels2.displayName = "Planning 📅 ";
channels2.description = "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu.";
channels2.isFavoriteByDefault = false;
channelsList.add(channels2);
Channel channels3 = new Channel();
channels3.displayName = "Issues and Feedback 🐞";
channels3.description = "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu.";
channelsList.add(channels3);
ChannelCollectionResponse channelCollectionResponse = new ChannelCollectionResponse();
channelCollectionResponse.value = channelsList;
ChannelCollectionPage channelCollectionPage = new ChannelCollectionPage(channelCollectionResponse, null);
team.channels = channelCollectionPage;
TeamMemberSettings memberSettings = new TeamMemberSettings();
memberSettings.allowCreateUpdateChannels = true;
memberSettings.allowDeleteChannels = true;
memberSettings.allowAddRemoveApps = true;
memberSettings.allowCreateUpdateRemoveTabs = true;
memberSettings.allowCreateUpdateRemoveConnectors = true;
team.memberSettings = memberSettings;
TeamGuestSettings guestSettings = new TeamGuestSettings();
guestSettings.allowCreateUpdateChannels = false;
guestSettings.allowDeleteChannels = false;
team.guestSettings = guestSettings;
TeamFunSettings funSettings = new TeamFunSettings();
funSettings.allowGiphy = true;
funSettings.giphyContentRating = GiphyRatingType.MODERATE;
funSettings.allowStickersAndMemes = true;
funSettings.allowCustomMemes = true;
team.funSettings = funSettings;
TeamMessagingSettings messagingSettings = new TeamMessagingSettings();
messagingSettings.allowUserEditMessages = true;
messagingSettings.allowUserDeleteMessages = true;
messagingSettings.allowOwnerDeleteMessages = true;
messagingSettings.allowTeamMentions = true;
messagingSettings.allowChannelMentions = true;
team.messagingSettings = messagingSettings;
TeamDiscoverySettings discoverySettings = new TeamDiscoverySettings();
discoverySettings.showInTeamsSearchAndSuggestions = true;
team.discoverySettings = discoverySettings;
LinkedList<TeamsAppInstallation> installedAppsList = new LinkedList<TeamsAppInstallation>();
TeamsAppInstallation installedApps = new TeamsAppInstallation();
installedApps.additionalDataManager().put("teamsApp@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')"));
installedAppsList.add(installedApps);
TeamsAppInstallation installedApps1 = new TeamsAppInstallation();
installedApps1.additionalDataManager().put("teamsApp@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')"));
installedAppsList.add(installedApps1);
TeamsAppInstallationCollectionResponse teamsAppInstallationCollectionResponse = new TeamsAppInstallationCollectionResponse();
teamsAppInstallationCollectionResponse.value = installedAppsList;
TeamsAppInstallationCollectionPage teamsAppInstallationCollectionPage = new TeamsAppInstallationCollectionPage(teamsAppInstallationCollectionResponse, null);
team.installedApps = teamsAppInstallationCollectionPage;
graphClient.teams()
.buildRequest()
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewTeam()
visibility := "Private"
requestBody.SetVisibility(&visibility)
displayName := "Sample Engineering Team"
requestBody.SetDisplayName(&displayName)
description := "This is a sample engineering team, used to showcase the range of properties supported by this API"
requestBody.SetDescription(&description)
requestBody.SetChannels( []Channel {
msgraphsdk.NewChannel(),
displayName := "Announcements 📢"
SetDisplayName(&displayName)
isFavoriteByDefault := true
SetIsFavoriteByDefault(&isFavoriteByDefault)
description := "This is a sample announcements channel that is favorited by default. Use this channel to make important team, product, and service announcements."
SetDescription(&description)
msgraphsdk.NewChannel(),
displayName := "Training 🏋️"
SetDisplayName(&displayName)
isFavoriteByDefault := true
SetIsFavoriteByDefault(&isFavoriteByDefault)
description := "This is a sample training channel, that is favorited by default, and contains an example of pinned website and YouTube tabs."
SetDescription(&description)
SetTabs( []TeamsTab {
msgraphsdk.NewTeamsTab(),
displayName := "A Pinned Website"
SetDisplayName(&displayName)
configuration := msgraphsdk.NewTeamsTabConfiguration()
SetConfiguration(configuration)
contentUrl := "https://docs.microsoft.com/microsoftteams/microsoft-teams"
configuration.SetContentUrl(&contentUrl)
SetAdditionalData(map[string]interface{}{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.web')",
}
msgraphsdk.NewTeamsTab(),
displayName := "A Pinned YouTube Video"
SetDisplayName(&displayName)
configuration := msgraphsdk.NewTeamsTabConfiguration()
SetConfiguration(configuration)
contentUrl := "https://tabs.teams.microsoft.com/Youtube/Home/YoutubeTab?videoId=X8krAMdGvCQ"
configuration.SetContentUrl(&contentUrl)
websiteUrl := "https://www.youtube.com/watch?v=X8krAMdGvCQ"
configuration.SetWebsiteUrl(&websiteUrl)
SetAdditionalData(map[string]interface{}{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.youtube')",
}
}
msgraphsdk.NewChannel(),
displayName := "Planning 📅 "
SetDisplayName(&displayName)
description := "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu."
SetDescription(&description)
isFavoriteByDefault := false
SetIsFavoriteByDefault(&isFavoriteByDefault)
msgraphsdk.NewChannel(),
displayName := "Issues and Feedback 🐞"
SetDisplayName(&displayName)
description := "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu."
SetDescription(&description)
}
memberSettings := msgraphsdk.NewTeamMemberSettings()
requestBody.SetMemberSettings(memberSettings)
allowCreateUpdateChannels := true
memberSettings.SetAllowCreateUpdateChannels(&allowCreateUpdateChannels)
allowDeleteChannels := true
memberSettings.SetAllowDeleteChannels(&allowDeleteChannels)
allowAddRemoveApps := true
memberSettings.SetAllowAddRemoveApps(&allowAddRemoveApps)
allowCreateUpdateRemoveTabs := true
memberSettings.SetAllowCreateUpdateRemoveTabs(&allowCreateUpdateRemoveTabs)
allowCreateUpdateRemoveConnectors := true
memberSettings.SetAllowCreateUpdateRemoveConnectors(&allowCreateUpdateRemoveConnectors)
guestSettings := msgraphsdk.NewTeamGuestSettings()
requestBody.SetGuestSettings(guestSettings)
allowCreateUpdateChannels := false
guestSettings.SetAllowCreateUpdateChannels(&allowCreateUpdateChannels)
allowDeleteChannels := false
guestSettings.SetAllowDeleteChannels(&allowDeleteChannels)
funSettings := msgraphsdk.NewTeamFunSettings()
requestBody.SetFunSettings(funSettings)
allowGiphy := true
funSettings.SetAllowGiphy(&allowGiphy)
giphyContentRating := "Moderate"
funSettings.SetGiphyContentRating(&giphyContentRating)
allowStickersAndMemes := true
funSettings.SetAllowStickersAndMemes(&allowStickersAndMemes)
allowCustomMemes := true
funSettings.SetAllowCustomMemes(&allowCustomMemes)
messagingSettings := msgraphsdk.NewTeamMessagingSettings()
requestBody.SetMessagingSettings(messagingSettings)
allowUserEditMessages := true
messagingSettings.SetAllowUserEditMessages(&allowUserEditMessages)
allowUserDeleteMessages := true
messagingSettings.SetAllowUserDeleteMessages(&allowUserDeleteMessages)
allowOwnerDeleteMessages := true
messagingSettings.SetAllowOwnerDeleteMessages(&allowOwnerDeleteMessages)
allowTeamMentions := true
messagingSettings.SetAllowTeamMentions(&allowTeamMentions)
allowChannelMentions := true
messagingSettings.SetAllowChannelMentions(&allowChannelMentions)
discoverySettings := msgraphsdk.NewTeamDiscoverySettings()
requestBody.SetDiscoverySettings(discoverySettings)
showInTeamsSearchAndSuggestions := true
discoverySettings.SetShowInTeamsSearchAndSuggestions(&showInTeamsSearchAndSuggestions)
requestBody.SetInstalledApps( []TeamsAppInstallation {
msgraphsdk.NewTeamsAppInstallation(),
SetAdditionalData(map[string]interface{}{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')",
}
msgraphsdk.NewTeamsAppInstallation(),
SetAdditionalData(map[string]interface{}{
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')",
}
}
requestBody.SetAdditionalData(map[string]interface{}{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
}
result, err := graphClient.Teams().Post(requestBody)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Import-Module Microsoft.Graph.Teams
$params = @{
"Template@odata.bind" = "https://graph.microsoft.com/beta/teamsTemplates('standard')"
Visibility = "Private"
DisplayName = "Sample Engineering Team"
Description = "This is a sample engineering team, used to showcase the range of properties supported by this API"
Channels = @(
@{
DisplayName = "Announcements 📢"
IsFavoriteByDefault = $true
Description = "This is a sample announcements channel that is favorited by default. Use this channel to make important team, product, and service announcements."
}
@{
DisplayName = "Training 🏋️"
IsFavoriteByDefault = $true
Description = "This is a sample training channel, that is favorited by default, and contains an example of pinned website and YouTube tabs."
Tabs = @(
@{
"TeamsApp@odata.bind" = "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.web')"
DisplayName = "A Pinned Website"
Configuration = @{
ContentUrl = "https://docs.microsoft.com/microsoftteams/microsoft-teams"
}
}
@{
"TeamsApp@odata.bind" = "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.youtube')"
DisplayName = "A Pinned YouTube Video"
Configuration = @{
ContentUrl = "https://tabs.teams.microsoft.com/Youtube/Home/YoutubeTab?videoId=X8krAMdGvCQ"
WebsiteUrl = "https://www.youtube.com/watch?v=X8krAMdGvCQ"
}
}
)
}
@{
DisplayName = "Planning 📅 "
Description = "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu."
IsFavoriteByDefault = $false
}
@{
DisplayName = "Issues and Feedback 🐞"
Description = "This is a sample of a channel that is not favorited by default, these channels will appear in the more channels overflow menu."
}
)
MemberSettings = @{
AllowCreateUpdateChannels = $true
AllowDeleteChannels = $true
AllowAddRemoveApps = $true
AllowCreateUpdateRemoveTabs = $true
AllowCreateUpdateRemoveConnectors = $true
}
GuestSettings = @{
AllowCreateUpdateChannels = $false
AllowDeleteChannels = $false
}
FunSettings = @{
AllowGiphy = $true
GiphyContentRating = "Moderate"
AllowStickersAndMemes = $true
AllowCustomMemes = $true
}
MessagingSettings = @{
AllowUserEditMessages = $true
AllowUserDeleteMessages = $true
AllowOwnerDeleteMessages = $true
AllowTeamMentions = $true
AllowChannelMentions = $true
}
DiscoverySettings = @{
ShowInTeamsSearchAndSuggestions = $true
}
InstalledApps = @(
@{
"TeamsApp@odata.bind" = "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')"
}
@{
"TeamsApp@odata.bind" = "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')"
}
)
}
New-MgTeam -BodyParameter $params
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
POST https://graph.microsoft.com/beta/teams
Content-Type: application/json
{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
"group@odata.bind": "https://graph.microsoft.com/beta/groups('71392b2f-1765-406e-86af-5907d9bdb2ab')"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('standard')"},
{"group@odata.bind", "https://graph.microsoft.com/beta/groups('71392b2f-1765-406e-86af-5907d9bdb2ab')"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/teamsTemplates('standard')"));
team.additionalDataManager().put("group@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/groups('71392b2f-1765-406e-86af-5907d9bdb2ab')"));
graphClient.teams()
.buildRequest()
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewTeam()
requestBody.SetAdditionalData(map[string]interface{}{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
"group@odata.bind": "https://graph.microsoft.com/beta/groups('71392b2f-1765-406e-86af-5907d9bdb2ab')",
}
options := &msgraphsdk.TeamsRequestBuilderPostOptions{
Body: requestBody,
}
result, err := graphClient.Teams().Post(options)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
Channels = new TeamChannelsCollectionPage()
{
new Channel
{
DisplayName = "Class Announcements 📢",
IsFavoriteByDefault = true
},
new Channel
{
DisplayName = "Homework 🏋️",
IsFavoriteByDefault = true
}
},
MemberSettings = new TeamMemberSettings
{
AllowCreateUpdateChannels = false,
AllowDeleteChannels = false,
AllowAddRemoveApps = false,
AllowCreateUpdateRemoveTabs = false,
AllowCreateUpdateRemoveConnectors = false
},
InstalledApps = new TeamInstalledAppsCollectionPage()
{
new TeamsAppInstallation
{
AdditionalData = new Dictionary<string, object>()
{
{"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')"}
}
},
new TeamsAppInstallation
{
AdditionalData = new Dictionary<string, object>()
{
{"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')"}
}
}
},
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('standard')"},
{"group@odata.bind", "https://graph.microsoft.com/beta/groups('dbd8de4f-5d47-48da-87f1-594bed003375')"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/teamsTemplates('standard')"));
team.additionalDataManager().put("group@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/groups('dbd8de4f-5d47-48da-87f1-594bed003375')"));
LinkedList<Channel> channelsList = new LinkedList<Channel>();
Channel channels = new Channel();
channels.displayName = "Class Announcements 📢";
channels.isFavoriteByDefault = true;
channelsList.add(channels);
Channel channels1 = new Channel();
channels1.displayName = "Homework 🏋️";
channels1.isFavoriteByDefault = true;
channelsList.add(channels1);
ChannelCollectionResponse channelCollectionResponse = new ChannelCollectionResponse();
channelCollectionResponse.value = channelsList;
ChannelCollectionPage channelCollectionPage = new ChannelCollectionPage(channelCollectionResponse, null);
team.channels = channelCollectionPage;
TeamMemberSettings memberSettings = new TeamMemberSettings();
memberSettings.allowCreateUpdateChannels = false;
memberSettings.allowDeleteChannels = false;
memberSettings.allowAddRemoveApps = false;
memberSettings.allowCreateUpdateRemoveTabs = false;
memberSettings.allowCreateUpdateRemoveConnectors = false;
team.memberSettings = memberSettings;
LinkedList<TeamsAppInstallation> installedAppsList = new LinkedList<TeamsAppInstallation>();
TeamsAppInstallation installedApps = new TeamsAppInstallation();
installedApps.additionalDataManager().put("teamsApp@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')"));
installedAppsList.add(installedApps);
TeamsAppInstallation installedApps1 = new TeamsAppInstallation();
installedApps1.additionalDataManager().put("teamsApp@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')"));
installedAppsList.add(installedApps1);
TeamsAppInstallationCollectionResponse teamsAppInstallationCollectionResponse = new TeamsAppInstallationCollectionResponse();
teamsAppInstallationCollectionResponse.value = installedAppsList;
TeamsAppInstallationCollectionPage teamsAppInstallationCollectionPage = new TeamsAppInstallationCollectionPage(teamsAppInstallationCollectionResponse, null);
team.installedApps = teamsAppInstallationCollectionPage;
graphClient.teams()
.buildRequest()
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
POST https://graph.microsoft.com/beta/teams
Content-Type: application/json
{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('educationClass')",
"displayName": "My Class Team",
"description": "My Class Team’s Description"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
DisplayName = "My Class Team",
Description = "My Class Team’s Description",
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('educationClass')"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
const team = {
'template@odata.bind': 'https://graph.microsoft.com/beta/teamsTemplates(\'educationClass\')',
displayName: 'My Class Team',
description: 'My Class Team’s Description'
};
await client.api('/teams')
.version('beta')
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/teamsTemplates('educationClass')"));
team.displayName = "My Class Team";
team.description = "My Class Team’s Description";
graphClient.teams()
.buildRequest()
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewTeam()
displayName := "My Class Team"
requestBody.SetDisplayName(&displayName)
description := "My Class Team’s Description"
requestBody.SetDescription(&description)
requestBody.SetAdditionalData(map[string]interface{}{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('educationClass')",
}
options := &msgraphsdk.TeamsRequestBuilderPostOptions{
Body: requestBody,
}
result, err := graphClient.Teams().Post(options)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Import-Module Microsoft.Graph.Teams
$params = @{
"Template@odata.bind" = "https://graph.microsoft.com/beta/teamsTemplates('educationClass')"
DisplayName = "My Class Team"
Description = "My Class Team’s Description"
}
New-MgTeam -BodyParameter $params
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
DisplayName = "My Class Team",
Description = "My Class Team’s Description",
Channels = new TeamChannelsCollectionPage()
{
new Channel
{
DisplayName = "Class Announcements 📢",
IsFavoriteByDefault = true
},
new Channel
{
DisplayName = "Homework 🏋️",
IsFavoriteByDefault = true
}
},
MemberSettings = new TeamMemberSettings
{
AllowCreateUpdateChannels = false,
AllowDeleteChannels = false,
AllowAddRemoveApps = false,
AllowCreateUpdateRemoveTabs = false,
AllowCreateUpdateRemoveConnectors = false
},
InstalledApps = new TeamInstalledAppsCollectionPage()
{
new TeamsAppInstallation
{
AdditionalData = new Dictionary<string, object>()
{
{"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')"}
}
},
new TeamsAppInstallation
{
AdditionalData = new Dictionary<string, object>()
{
{"teamsApp@odata.bind", "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')"}
}
}
},
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('educationClass')"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/teamsTemplates('educationClass')"));
team.displayName = "My Class Team";
team.description = "My Class Team’s Description";
LinkedList<Channel> channelsList = new LinkedList<Channel>();
Channel channels = new Channel();
channels.displayName = "Class Announcements 📢";
channels.isFavoriteByDefault = true;
channelsList.add(channels);
Channel channels1 = new Channel();
channels1.displayName = "Homework 🏋️";
channels1.isFavoriteByDefault = true;
channelsList.add(channels1);
ChannelCollectionResponse channelCollectionResponse = new ChannelCollectionResponse();
channelCollectionResponse.value = channelsList;
ChannelCollectionPage channelCollectionPage = new ChannelCollectionPage(channelCollectionResponse, null);
team.channels = channelCollectionPage;
TeamMemberSettings memberSettings = new TeamMemberSettings();
memberSettings.allowCreateUpdateChannels = false;
memberSettings.allowDeleteChannels = false;
memberSettings.allowAddRemoveApps = false;
memberSettings.allowCreateUpdateRemoveTabs = false;
memberSettings.allowCreateUpdateRemoveConnectors = false;
team.memberSettings = memberSettings;
LinkedList<TeamsAppInstallation> installedAppsList = new LinkedList<TeamsAppInstallation>();
TeamsAppInstallation installedApps = new TeamsAppInstallation();
installedApps.additionalDataManager().put("teamsApp@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('com.microsoft.teamspace.tab.vsts')"));
installedAppsList.add(installedApps);
TeamsAppInstallation installedApps1 = new TeamsAppInstallation();
installedApps1.additionalDataManager().put("teamsApp@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/appCatalogs/teamsApps('1542629c-01b3-4a6d-8f76-1938b779e48d')"));
installedAppsList.add(installedApps1);
TeamsAppInstallationCollectionResponse teamsAppInstallationCollectionResponse = new TeamsAppInstallationCollectionResponse();
teamsAppInstallationCollectionResponse.value = installedAppsList;
TeamsAppInstallationCollectionPage teamsAppInstallationCollectionPage = new TeamsAppInstallationCollectionPage(teamsAppInstallationCollectionResponse, null);
team.installedApps = teamsAppInstallationCollectionPage;
graphClient.teams()
.buildRequest()
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var team = new Team
{
DisplayName = "My Sample Team",
Description = "My Sample Team’s Description",
Members = new TeamMembersCollectionPage()
{
new AadUserConversationMember
{
Roles = new List<String>()
{
"owner"
},
AdditionalData = new Dictionary<string, object>()
{
{"user@odata.bind", "https://graph.microsoft.com/beta/users('jacob@contoso.com')"}
}
}
},
AdditionalData = new Dictionary<string, object>()
{
{"template@odata.bind", "https://graph.microsoft.com/beta/teamsTemplates('standard')"}
}
};
await graphClient.Teams
.Request()
.AddAsync(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/teamsTemplates('standard')"));
team.displayName = "My Sample Team";
team.description = "My Sample Team’s Description";
LinkedList<ConversationMember> membersList = new LinkedList<ConversationMember>();
AadUserConversationMember members = new AadUserConversationMember();
LinkedList<String> rolesList = new LinkedList<String>();
rolesList.add("owner");
members.roles = rolesList;
members.additionalDataManager().put("user@odata.bind", new JsonPrimitive("https://graph.microsoft.com/beta/users('jacob@contoso.com')"));
membersList.add(members);
ConversationMemberCollectionResponse conversationMemberCollectionResponse = new ConversationMemberCollectionResponse();
conversationMemberCollectionResponse.value = membersList;
ConversationMemberCollectionPage conversationMemberCollectionPage = new ConversationMemberCollectionPage(conversationMemberCollectionResponse, null);
team.members = conversationMemberCollectionPage;
graphClient.teams()
.buildRequest()
.post(team);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewTeam()
displayName := "My Sample Team"
requestBody.SetDisplayName(&displayName)
description := "My Sample Team’s Description"
requestBody.SetDescription(&description)
requestBody.SetMembers( []ConversationMember {
msgraphsdk.NewConversationMember(),
SetRoles( []String {
"owner",
}
SetAdditionalData(map[string]interface{}{
"@odata.type": "#microsoft.graph.aadUserConversationMember",
"user@odata.bind": "https://graph.microsoft.com/beta/users('jacob@contoso.com')",
}
}
requestBody.SetAdditionalData(map[string]interface{}{
"template@odata.bind": "https://graph.microsoft.com/beta/teamsTemplates('standard')",
}
result, err := graphClient.Teams().Post(requestBody)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ 版で使用できるすべての種類、プロパティ、API はサポートされていません。 SDK を使用してベータ API にアクセスする方法の詳細については、「Microsoft Graph SDK とベータ API を使用する」を参照してください。