名前空間: microsoft.graph
重要
Microsoft Graph の /beta
バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
テナントで使用できる teamTemplate オブジェクトの一覧を取得します。
この API は、次の国内クラウド展開で使用できます。
グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
✅ |
✅ |
✅ |
✅ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
委任 (職場または学校のアカウント) |
TeamTemplates.Read |
注意事項なし。 |
委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
アプリケーション |
TeamTemplates.Read.All |
注意事項なし。 |
HTTP 要求
GET /teamwork/teamTemplates
オプションのクエリ パラメーター
このメソッドは、応答をカスタマイズするために、 $expand
、 $filter
、 $skipToken
OData クエリ パラメーター をサポートします。
名前 |
説明 |
Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK
応答コードと teamTemplate オブジェクトのコレクションを返します。
例
例 1: チーム テンプレートの一覧を取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/teamwork/teamTemplates
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teamwork.TeamTemplates.GetAsync();
mgc-beta teamwork team-templates list
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamTemplates, err := graphClient.Teamwork().TeamTemplates().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamTemplateCollectionResponse result = graphClient.teamwork().teamTemplates().get();
const options = {
authProvider,
};
const client = Client.init(options);
let teamTemplates = await client.api('/teamwork/teamTemplates')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->teamwork()->teamTemplates()->get()->wait();
Import-Module Microsoft.Graph.Beta.Teams
Get-MgBetaTeamworkTeamTemplate
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.teamwork.team_templates.get()
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": [
{
"id": "com.microsoft.teams.template.ManageAProject"
},
{
"id": "com.microsoft.teams.template.ManageAnEvent"
}
]
}
例 2: $extendと$filterを使用して、en-US ロケールの templateDefinitions を取得する
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/beta/teamwork/teamTemplates?$expand=definitions&filter=definitions/any(a:a/languageTag eq 'en-US')
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teamwork.TeamTemplates.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Expand = new string []{ "definitions" };
requestConfiguration.QueryParameters.Filter = "definitions/any(a:a/languageTag eq 'en-US')";
});
mgc-beta teamwork team-templates list --expand "definitions"
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphteamwork "github.com/microsoftgraph/msgraph-beta-sdk-go/teamwork"
//other-imports
)
requestFilter := "definitions/any(a:a/languageTag eq 'en-US')"
requestParameters := &graphteamwork.TeamworkTeamTemplatesRequestBuilderGetQueryParameters{
Expand: [] string {"definitions"},
Filter: &requestFilter,
}
configuration := &graphteamwork.TeamworkTeamTemplatesRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamTemplates, err := graphClient.Teamwork().TeamTemplates().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamTemplateCollectionResponse result = graphClient.teamwork().teamTemplates().get(requestConfiguration -> {
requestConfiguration.queryParameters.expand = new String []{"definitions"};
requestConfiguration.queryParameters.filter = "definitions/any(a:a/languageTag eq 'en-US')";
});
const options = {
authProvider,
};
const client = Client.init(options);
let teamTemplates = await client.api('/teamwork/teamTemplates?$expand=definitions&filter=definitions/any(a:a/languageTag eq \'en-US\')')
.version('beta')
.filter('definitions/any(a:a/languageTag eq \'en-US\')')
.expand('definitions')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Teamwork\TeamTemplates\TeamTemplatesRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new TeamTemplatesRequestBuilderGetRequestConfiguration();
$queryParameters = TeamTemplatesRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->expand = ["definitions"];
$queryParameters->filter = "definitions/any(a:a/languageTag eq 'en-US')";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->teamwork()->teamTemplates()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Teams
Get-MgBetaTeamworkTeamTemplate -ExpandProperty "definitions" -Filter "definitions/any(a:a/languageTag eq 'en-US')"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.teamwork.team_templates.team_templates_request_builder import TeamTemplatesRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = TeamTemplatesRequestBuilder.TeamTemplatesRequestBuilderGetQueryParameters(
expand = ["definitions"],
filter = "definitions/any(a:a/languageTag eq 'en-US')",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.teamwork.team_templates.get(request_configuration = request_configuration)
応答
次の例は応答を示しています。
注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": [
{
"id": "com.microsoft.teams.template.ManageAProject",
"definitions": [
{
"id": "Y29tLm1pY3Jvc29mdC50ZWFtcy50ZW1wbGF0ZS5NYW5hZ2VBUHJvamVjdCMjUHVibGljIyNlbi1VUw==",
"parentTemplateId": "com.microsoft.teams.template.ManageAProject",
"displayName": "Manage a Project",
"languageTag": "en-US",
"audience": "public",
"description": "Manage tasks, share documents, conduct project meetings and document risks and decisions with this template for general project management.",
"shortDescription": "Coordinate your project.",
"lastModifiedDateTime": "0001-01-01T00:00:00Z",
"publisherName": "Microsoft",
"categories": [
"General"
],
"lastModifiedBy": null
}
]
},
{
"id": "com.microsoft.teams.template.ManageAnEvent",
"definitions": [
{
"id": "Y29tLm1pY3Jvc29mdC50ZWFtcy50ZW1wbGF0ZS5NYW5hZ2VBbkV2ZW50IyNQdWJsaWMjI2VuLVVT",
"parentTemplateId": "com.microsoft.teams.template.ManageAnEvent",
"displayName": "Manage an Event",
"languageTag": "en-US",
"audience": "public",
"description": "Manage tasks, documents, and collaborate on everything you need to deliver a compelling event. Invite guest users to have a secure collaboration inside and outside of your company.",
"shortDescription": "Improve your event management and collaboration.",
"lastModifiedDateTime": "0001-01-01T00:00:00Z",
"publisherName": "Microsoft",
"categories": [
"General"
],
"lastModifiedBy": null
}
]
}
]
}