TeamsApp を一覧表示する
[アーティクル]
10/30/2023
16 人の共同作成者
フィードバック
この記事の内容
名前空間: microsoft.graph
Microsoft Teams アプリ カタログから アプリ を一覧表示します。
これには、Microsoft Teams ストアのアプリと、organizationのアプリ カタログ (テナント アプリ カタログ) のアプリが含まれます。 organizationのアプリ カタログからアプリのみを取得するには、要求で distributionMethod としてを指定organization
します。
注:
一般に、teamsApp リソースの ID はサーバーによって生成されます。 distributionMethod store
が でない限り、Teams アプリ マニフェストで指定された ID と 同じではありません。 その他の場合、開発者が Teams アプリ マニフェストの一部として指定した ID は、teamsApp リソースの externalId としてスタンプされます。
この API は、次の国内クラウド展開 で使用できます。
グローバル サービス
米国政府機関 L4
米国政府機関 L5 (DOD)
21Vianet が運営する中国
✅
✅
✅
❌
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。 アプリで必要な場合にのみ 、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「 アクセス許可の種類 」を参照してください。 これらのアクセス許可の詳細については、 アクセス許可のリファレンスを参照してください 。
アクセス許可の種類
最小特権アクセス許可
特権の高いアクセス許可
委任 (職場または学校のアカウント)
AppCatalog.Submit
AppCatalog.Read.All、AppCatalog.ReadWrite.All、Directory.Read.All、Directory.ReadWrite.All
委任 (個人用 Microsoft アカウント)
サポートされていません。
サポートされていません。
アプリケーション
AppCatalog.Read.All
AppCatalog.ReadWrite.All
注:
Directory.Read.All および Directory.ReadWrite.All のアクセス許可は、下位互換性のためにのみサポートされます。 代替アクセス許可を使用するようにソリューションを更新し、今後これらのアクセス許可を使用しないようにすることをお勧めします。
HTTP 要求
GET /appCatalogs/teamsApps
オプションのクエリ パラメーター
このメソッドは、応答のカスタマイズに $filter
役立つ、 $select
、および $expand
OData クエリ パラメーター をサポートします。
を使用すると $expand=AppDefinitions
、アプリの状態に関する詳細情報 ( publishingState など) が返されます。これはアプリの申請レビューの状態を反映し、アプリが承認、拒否、またはレビュー中のままかどうかを返します。
メモ: teamsApp オブジェクトの任意のフィールドをフィルター処理して、結果の一覧を短縮できます。 次のいずれかのフィルター操作を使用できます。等しい、等しくない、または使用できません。
ヘッダー
値
Authorization
ベアラー {token}。 必須です。 認証と承認 の詳細については、こちらをご覧ください。
要求本文
このメソッドには、要求本文を指定しません。
応答
成功した場合、このメソッドは 200 OK
応答コードと、応答本文の teamsApp オブジェクトの一覧を返します。
例
例 1: テナントに固有のすべてのアプリケーションを一覧表示する
次の例では、テナントに固有のすべてのアプリケーションの一覧を示します。
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$filter=distributionMethod eq 'organization'
// 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.AppCatalogs.TeamsApps.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "distributionMethod eq 'organization'";
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc app-catalogs teams-apps list --filter "distributionMethod eq 'organization'"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestFilter := "distributionMethod eq 'organization'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppCollectionResponse result = graphClient.appCatalogs().teamsApps().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "distributionMethod eq 'organization'";
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let teamsApps = await client.api('/appCatalogs/teamsApps')
.filter('distributionMethod eq \'organization\'')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\AppCatalogs\TeamsApps\TeamsAppsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new TeamsAppsRequestBuilderGetRequestConfiguration();
$queryParameters = TeamsAppsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->filter = "distributionMethod eq 'organization'";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->appCatalogs()->teamsApps()->get($requestConfiguration)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.appCatalogs.teamsApps.teams_apps_request_builder import TeamsAppsRequestBuilder
graph_client = GraphServiceClient(credentials, scopes)
query_params = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "distributionMethod eq 'organization'",
)
request_configuration = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetRequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": [
{
"id": "b1c5353a-7aca-41b3-830f-27d5218fe0e5",
"externalId": "f31b1263-ba99-435a-a679-911d24850d7c",
"displayName": "Test App",
"distributionMethod": "organization"
}
]
}
例 2: 特定の ID を持つアプリケーションを一覧表示する
次の例では、特定の ID を持つアプリケーションの一覧を示します。
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$filter=id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'
// 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.AppCatalogs.TeamsApps.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'";
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc app-catalogs teams-apps list --filter "id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestFilter := "id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppCollectionResponse result = graphClient.appCatalogs().teamsApps().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'";
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let teamsApps = await client.api('/appCatalogs/teamsApps')
.filter('id eq \'b1c5353a-7aca-41b3-830f-27d5218fe0e5\'')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\AppCatalogs\TeamsApps\TeamsAppsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new TeamsAppsRequestBuilderGetRequestConfiguration();
$queryParameters = TeamsAppsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->filter = "id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->appCatalogs()->teamsApps()->get($requestConfiguration)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.appCatalogs.teamsApps.teams_apps_request_builder import TeamsAppsRequestBuilder
graph_client = GraphServiceClient(credentials, scopes)
query_params = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'",
)
request_configuration = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetRequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": [
{
"id": "b1c5353a-7aca-41b3-830f-27d5218fe0e5",
"externalId": "f31b1263-ba99-435a-a679-911d24850d7c",
"displayName": "Test App",
"distributionMethod": "organization"
}
]
}
例 3: Teams アプリ マニフェスト ID に基づいてアプリケーションを検索する
次の例では、Teams アプリ マニフェストで指定された ID と一致するアプリケーションの一覧を示します。 この例では、Teams アプリのマニフェスト ID は です cf1ba4c7-f94e-4d80-ba90-5594b641a8ee
。
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$filter=externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'
// 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.AppCatalogs.TeamsApps.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'";
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc app-catalogs teams-apps list --filter "externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestFilter := "externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppCollectionResponse result = graphClient.appCatalogs().teamsApps().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'";
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let teamsApps = await client.api('/appCatalogs/teamsApps')
.filter('externalId eq \'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee\'')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\AppCatalogs\TeamsApps\TeamsAppsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new TeamsAppsRequestBuilderGetRequestConfiguration();
$queryParameters = TeamsAppsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->filter = "externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->appCatalogs()->teamsApps()->get($requestConfiguration)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.appCatalogs.teamsApps.teams_apps_request_builder import TeamsAppsRequestBuilder
graph_client = GraphServiceClient(credentials, scopes)
query_params = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'",
)
request_configuration = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetRequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#appCatalogs/teamsApps",
"value": [
{
"id": "22f73bbe-f67a-4dea-bd54-54cac718cb2b",
"externalId": "cf1ba4c7-f94e-4d80-ba90-5594b641a8ee",
"displayName": "YPA",
"distributionMethod": "organization"
}
]
}
例 4: 特定の ID を持つアプリケーションを一覧表示し、申請レビューの状態を返す
次の例では、特定の ID を持つアプリケーションを一覧表示し、 appDefinitions を展開して publishingState を 返します。これはアプリの申請レビュー状態を反映しています。 Submitted
レビューが保留中であることを意味し、 published
管理者がアプリを承認したことを意味し rejected
、管理者がアプリを拒否したことを意味します。
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$filter=id eq '876df28f-2e78-423b-94a5-44181bd0e225'&$expand=appDefinitions
// 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.AppCatalogs.TeamsApps.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "id eq '876df28f-2e78-423b-94a5-44181bd0e225'";
requestConfiguration.QueryParameters.Expand = new string []{ "appDefinitions" };
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc app-catalogs teams-apps list --filter "id eq '876df28f-2e78-423b-94a5-44181bd0e225'" --expand "appDefinitions"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestFilter := "id eq '876df28f-2e78-423b-94a5-44181bd0e225'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
Expand: [] string {"appDefinitions"},
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppCollectionResponse result = graphClient.appCatalogs().teamsApps().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "id eq '876df28f-2e78-423b-94a5-44181bd0e225'";
requestConfiguration.queryParameters.expand = new String []{"appDefinitions"};
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let teamsApps = await client.api('/appCatalogs/teamsApps')
.filter('id eq \'876df28f-2e78-423b-94a5-44181bd0e225\'')
.expand('appDefinitions')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\AppCatalogs\TeamsApps\TeamsAppsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new TeamsAppsRequestBuilderGetRequestConfiguration();
$queryParameters = TeamsAppsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->filter = "id eq '876df28f-2e78-423b-94a5-44181bd0e225'";
$queryParameters->expand = ["appDefinitions"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->appCatalogs()->teamsApps()->get($requestConfiguration)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
Import-Module Microsoft.Graph.Teams
Get-MgAppCatalogTeamApp -Filter "id eq '876df28f-2e78-423b-94a5-44181bd0e225'" -ExpandProperty "appDefinitions"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.appCatalogs.teamsApps.teams_apps_request_builder import TeamsAppsRequestBuilder
graph_client = GraphServiceClient(credentials, scopes)
query_params = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "id eq '876df28f-2e78-423b-94a5-44181bd0e225'",
expand = ["appDefinitions"],
)
request_configuration = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetRequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": [
{
"id": "876df28f-2e78-423b-94a5-44181bd0e225",
"externalId": "f31b1263-ba99-435a-a679-911d24850d7c",
"displayName": "Test App",
"distributionMethod": "Organization",
"appDefinitions": [
{
"id": "NGQyMGNiNDUtZWViYS00ZTEyLWE3YzktMGQ0NDgzYjYxNzU2IyMxLjAuMA==",
"teamsAppId": "876df28f-2e78-423b-94a5-44181bd0e225",
"displayName": "Test App",
"version": "1.0.1",
"publishingState": "published",
"shortDescription": "Types Of Cards.",
"description": "This sample shows the feature where user can send different types of cards using bot.",
"lastModifiedDateTime": "2020-11-23T21:36:00.9437445Z",
"createdBy": null
}
]
}
]
}
例 5: ボットを含むカタログ内のアプリのみの詳細を一覧表示する
次の例では、ボットを含むカタログ内のアプリのみを一覧表示します。
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$expand=appDefinitions($expand=bot)&$filter=appDefinitions/any(a:a/bot ne null)
// 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.AppCatalogs.TeamsApps.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Expand = new string []{ "appDefinitions($expand=bot)" };
requestConfiguration.QueryParameters.Filter = "appDefinitions/any(a:a/bot ne null)";
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc app-catalogs teams-apps list --filter "appDefinitions/any(a:a/bot ne null)" --expand "appDefinitions(\$expand=bot)"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestFilter := "appDefinitions/any(a:a/bot ne null)"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Expand: [] string {"appDefinitions($expand=bot)"},
Filter: &requestFilter,
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppCollectionResponse result = graphClient.appCatalogs().teamsApps().get(requestConfiguration -> {
requestConfiguration.queryParameters.expand = new String []{"appDefinitions($expand=bot)"};
requestConfiguration.queryParameters.filter = "appDefinitions/any(a:a/bot ne null)";
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let teamsApps = await client.api('/appCatalogs/teamsApps')
.filter('appDefinitions/any(a:a/bot ne null)')
.expand('appDefinitions($expand=bot)')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\AppCatalogs\TeamsApps\TeamsAppsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new TeamsAppsRequestBuilderGetRequestConfiguration();
$queryParameters = TeamsAppsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->expand = ["appDefinitions(\$expand=bot)"];
$queryParameters->filter = "appDefinitions/any(a:a/bot ne null)";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->appCatalogs()->teamsApps()->get($requestConfiguration)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
Import-Module Microsoft.Graph.Teams
Get-MgAppCatalogTeamApp -ExpandProperty "appDefinitions(`$expand=bot)" -Filter "appDefinitions/any(a:a/bot ne null)"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.appCatalogs.teamsApps.teams_apps_request_builder import TeamsAppsRequestBuilder
graph_client = GraphServiceClient(credentials, scopes)
query_params = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
expand = ["appDefinitions($expand=bot)"],
filter = "appDefinitions/any(a:a/bot ne null)",
)
request_configuration = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetRequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#appCatalogs/teamsApps(appDefinitions(bot()))",
"value": [
{
"id": "8a1ed7a3-5c78-46b2-8504-f9da00a1d1a6",
"externalId": "3CAB7543-216D-47C6-986C-6247670F4663",
"displayName": "Ducks-3",
"distributionMethod": "organization",
"appDefinitions": [
{
"@odata.etag": "ImNOTW1CR2V1VzgwczlEblVidU00UHc9PSI=",
"id": "OGExZWQ3YTMtNWM3OC00NmIyLTg1MDQtZjlkYTAwYTFkMWE2IyMxLjAuOSMjUmVqZWN0ZWQ=",
"teamsAppId": "8a1ed7a3-5c78-46b2-8504-f9da00a1d1a6",
"displayName": "Ducks-3",
"version": "1.0.9",
"publishingState": "rejected",
"shortDescription": "quaerat quasi magnam. slight change. 5",
"description": "Aliquid placeat animi debitis accusamus. Non perferendis ullam. Quis est consequuntur vitae provident. Sunt laudantium id aut. slight change 5",
"lastModifiedDateTime": "2020-11-23T21:36:00.9437445Z",
"createdBy": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "70292a90-d2a7-432c-857e-55db6d8f5cd0",
"displayName": null,
"userIdentityType": "aadUser"
}
},
"authorization":
{
"requiredPermissionSet":
{
"resourceSpecificPermissions": []
}
},
"bot": {
"id": "bb9f67a4-893b-48d7-ab17-40ed466c0f16"
}
}
]
},
{
"id": "30909dee-f7dd-4f89-8b3b-55de2e32489c",
"externalId": "0ebd3f4d-ca91-495b-a227-a17d298e22cc",
"displayName": "Self-Install-App-E2E-Tests",
"distributionMethod": "organization",
"appDefinitions": [
{
"@odata.etag": "IkwzVDlMOTBSSEdTMFducHUyYkpjVmc9PSI=",
"id": "MzA5MDlkZWUtZjdkZC00Zjg5LThiM2ItNTVkZTJlMzI0ODljIyM2LjAuMCMjU3VibWl0dGVk",
"teamsAppId": "30909dee-f7dd-4f89-8b3b-55de2e32489c",
"displayName": "Self-Install-App-E2E-Tests",
"version": "6.0.0",
"publishingState": "submitted",
"shortDescription": "A conversational smart assistant from MSX that surfaces real-time insights.",
"description": "For MSX Users: A conversational role-based smart assistant that will enable Enterprise sellers (AE, ATS, SSP, TSP) to be more productive by surfacing real-time insights, recommendations, actions and notifications, and by automating repetitive tasks.",
"lastModifiedDateTime": "2020-08-25T18:40:13.035341Z",
"createdBy": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "c071a180-a220-43a1-adaf-e8db95c4a7d6",
"displayName": null,
"userIdentityType": "aadUser"
}
},
"authorization":
{
"requiredPermissionSet":
{
"resourceSpecificPermissions": []
}
},
"bot": {
"id": "da7d471b-de7d-4152-8556-1cdf7a564f6c"
}
}
]
}
]
}
例 7: 特定の ID を持つアプリケーションを一覧表示し、アプリに必要なリソース固有のアクセス許可のみを返す
次の例では、特定の ID を持つアプリの一覧を示し、それに関連付けられているリソース固有のアクセス許可を返します。
要求
次の例は要求を示しています。
GET https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$filter=id+eq+'a5228c26-a9ae-4702-90e0-79a5246d2f7d'&$expand=appDefinitions($select=id,authorization)
// 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.AppCatalogs.TeamsApps.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'";
requestConfiguration.QueryParameters.Expand = new string []{ "appDefinitions($select=id,authorization)" };
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc app-catalogs teams-apps list --filter "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'" --expand "appDefinitions(\$select=id,authorization)"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestFilter := "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
Expand: [] string {"appDefinitions($select=id,authorization)"},
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppCollectionResponse result = graphClient.appCatalogs().teamsApps().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'";
requestConfiguration.queryParameters.expand = new String []{"appDefinitions($select=id,authorization)"};
});
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
const options = {
authProvider,
};
const client = Client.init(options);
let teamsApps = await client.api('/appCatalogs/teamsApps')
.filter('id eq \'a5228c26-a9ae-4702-90e0-79a5246d2f7d\'')
.expand('appDefinitions($select=id,authorization)')
.get();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\AppCatalogs\TeamsApps\TeamsAppsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new TeamsAppsRequestBuilderGetRequestConfiguration();
$queryParameters = TeamsAppsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->filter = "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'";
$queryParameters->expand = ["appDefinitions(\$select=id,authorization)"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->appCatalogs()->teamsApps()->get($requestConfiguration)->wait();
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
Import-Module Microsoft.Graph.Teams
Get-MgAppCatalogTeamApp -Filter "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'" -ExpandProperty "appDefinitions(`$select=id,authorization)"
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.appCatalogs.teamsApps.teams_apps_request_builder import TeamsAppsRequestBuilder
graph_client = GraphServiceClient(credentials, scopes)
query_params = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'",
expand = ["appDefinitions($select=id,authorization)"],
)
request_configuration = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetRequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
プロジェクトに SDK を追加 し、authProvider インスタンスを作成 する方法の詳細については、SDK のドキュメント を参照してください。
応答
次の例は応答を示しています。
HTTP/1.1 200 OK
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#appCatalogs/teamsApps(appDefinitions(id,authorization))",
"value": [
{
"id": "a5228c26-a9ae-4702-90e0-79a5246d2f7d",
"externalId": "a55ec032-36e9-4b60-b604-34b2fe55abf1",
"displayName": "teamsDelegatedRscTests",
"distributionMethod": "organization",
"appDefinitions@odata.context": "https://graph.microsoft.com/v1.0/$metadata#appCatalogs/teamsApps('a5228c26-a9ae-4702-90e0-79a5246d2f7d')/appDefinitions(id,authorization)",
"appDefinitions": [
{
"id": "YTUyMjhjMjYtYTlhZS00NzAyLTkwZTAtNzlhNTI0NmQyZjdkIyMxLjAuMCMjUHVibGlzaGVk",
"authorization": {
"requiredPermissionSet": {
"resourceSpecificPermissions": [
{
"permissionValue": "Channel.Create.Group",
"permissionType": "application"
},
{
"permissionValue": "Channel.Delete.Group",
"permissionType": "application"
},
{
"permissionValue": "ChannelMeeting.ReadBasic.Group",
"permissionType": "delegated"
}
]
}
}
}
]
}
]
}
関連コンテンツ