Répertoriez les applications du catalogue d’applications Microsoft Teams, y compris les applications du Magasin Microsoft Teams et les applications du catalogue d’applications de votre organization (le catalogue d’applications client). Pour obtenir des applications à partir du catalogue d’applications de votre organization uniquement, spécifiez organization en tant que distributionMethod dans la requête.
Remarque
En général, l’ID d’une ressource teamsApp est généré par le serveur. Il n’est pas identique à l’ID spécifié dans un manifeste d’application Teams, sauf si sa méthode de distribution est store. Dans d’autres cas, l’ID fourni par le développeur dans le cadre du manifeste de l’application Teams est marqué comme externalId dans la ressource teamsApp .
Importante
Actuellement, cette API est uniquement prise en charge dans le contexte utilisateur et non dans la vue administrateur.
Les applications Teams retournées par cette API sont conformes aux stratégies de gestion des applications établies par l’administrateur.
Une fois les applications Teams publiées, il faut généralement 24 à 48 heures pour que les stratégies soient appliquées, de sorte que certaines applications peuvent ne pas apparaître immédiatement dans les résultats de l’API.
Les autorisations Directory.Read.All et Directory.ReadWrite.All sont prises en charge uniquement pour la compatibilité descendante. Nous vous recommandons de mettre à jour vos solutions pour utiliser une autre autorisation et éviter d’utiliser ces autorisations à l’avenir.
Requête HTTP
GET /appCatalogs/teamsApps
Paramètres facultatifs de la requête
Cette méthode prend en charge les $filterparamètres de requête OData , $selectet $expand pour vous aider à personnaliser la réponse.
L’utilisation $expand=AppDefinitions de renvoie plus d’informations sur l’état de l’application, comme publishingState, qui reflète la révision de la soumission de l’application status et indique si une application est approuvée, rejetée ou reste en cours d’examen.
Note: Vous pouvez filtrer sur l’un des champs de l’objet teamsApp pour raccourcir la liste des résultats. Vous pouvez utiliser l’une des opérations de filtre suivantes : Égal à, différent et, ou, et non.
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'";
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
requestFilter := "distributionMethod eq 'organization'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
// 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'";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.app_catalogs.teams_apps.teams_apps_request_builder import TeamsAppsRequestBuilder
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 = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "distributionMethod eq 'organization'",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
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'";
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
requestFilter := "id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
// 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'";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.app_catalogs.teams_apps.teams_apps_request_builder import TeamsAppsRequestBuilder
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 = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "id eq 'b1c5353a-7aca-41b3-830f-27d5218fe0e5'",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
Exemple 3 : Rechercher une application basée sur l’ID de manifeste d’application Teams
L’exemple suivant répertorie les applications qui correspondent à l’ID spécifié dans le manifeste de l’application Teams. Dans l’exemple, l’ID de manifeste de l’application Teams est 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'";
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
requestFilter := "externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
// 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'";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.app_catalogs.teams_apps.teams_apps_request_builder import TeamsAppsRequestBuilder
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 = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
Exemple 4 : Répertorier les applications avec un ID donné et retourner l’état de révision de la soumission
L’exemple suivant répertorie les applications avec un ID donné et développe appDefinitions pour renvoyer l’objet publishingState, qui reflète l’état de révision de la soumission de l’application.
Submitted signifie que la révision est en attente, published que l’administrateur a approuvé l’application et rejected que l’administrateur a rejeté l’application.
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" };
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
requestFilter := "id eq '876df28f-2e78-423b-94a5-44181bd0e225'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
Expand: [] string {"appDefinitions"},
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
// 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"};
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.app_catalogs.teams_apps.teams_apps_request_builder import TeamsAppsRequestBuilder
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 = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "id eq '876df28f-2e78-423b-94a5-44181bd0e225'",
expand = ["appDefinitions"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
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)";
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
requestFilter := "appDefinitions/any(a:a/bot ne null)"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Expand: [] string {"appDefinitions($expand=bot)"},
Filter: &requestFilter,
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
// 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)";
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.app_catalogs.teams_apps.teams_apps_request_builder import TeamsAppsRequestBuilder
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 = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
expand = ["appDefinitions($expand=bot)"],
filter = "appDefinitions/any(a:a/bot ne null)",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)
Exemple 6 : Répertorier les applications avec un ID donné et retourner uniquement les autorisations spécifiques à la ressource requises par l’application
L’exemple suivant répertorie les applications avec un ID donné et retourne les autorisations spécifiques à la ressource qui lui sont associées.
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)" };
});
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphappcatalogs "github.com/microsoftgraph/msgraph-sdk-go/appcatalogs"
//other-imports
)
requestFilter := "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'"
requestParameters := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetQueryParameters{
Filter: &requestFilter,
Expand: [] string {"appDefinitions($select=id,authorization)"},
}
configuration := &graphappcatalogs.AppCatalogsTeamsAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamsApps, err := graphClient.AppCatalogs().TeamsApps().Get(context.Background(), configuration)
// 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)"};
});
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.app_catalogs.teams_apps.teams_apps_request_builder import TeamsAppsRequestBuilder
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 = TeamsAppsRequestBuilder.TeamsAppsRequestBuilderGetQueryParameters(
filter = "id eq 'a5228c26-a9ae-4702-90e0-79a5246d2f7d'",
expand = ["appDefinitions($select=id,authorization)"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.app_catalogs.teams_apps.get(request_configuration = request_configuration)