Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Espace de noms: microsoft.graph
Importante
Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Répertorier toutes les installations d’applications au sein d’une conversation.
Si la conversation est associée à une instance de réunion en ligne, les application teamsinstallées dans la réunion seront effectivement répertoriées.
Remarque
La valeur id de la ressource teamsAppInstallation n’est pas la même que celle id de la ressource teamsApp associée.
Cette API est disponible dans les déploiements cloud nationaux suivants.
| Service global | Gouvernement américain L4 | Gouvernement américain L5 (DOD) | Chine exploitée par 21Vianet |
|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ |
Autorisations
Choisissez l’autorisation ou les autorisations marquées comme étant les moins privilégiées pour cette API. Utilisez une ou plusieurs autorisations privilégiées uniquement si votre application en a besoin. Pour plus d’informations sur les autorisations déléguées et d’application, voir Types d’autorisations. Pour en savoir plus sur ces autorisations, consultez la référence des autorisations.
| Type d’autorisation | Autorisations les moins privilégiées | Autorisations à privilèges plus élevés |
|---|---|---|
| Déléguée (compte professionnel ou scolaire) | TeamsAppInstallation.ReadForChat | TeamsAppInstallation.ReadWriteSelfForChat, TeamsAppInstallation.ManageSelectedForChat, TeamsAppInstallation.ReadWriteAndConsentForChat, TeamsAppInstallation.ReadWriteAndConsentSelfForChat, TeamsAppInstallation.ReadWriteForChat |
| Déléguée (compte Microsoft personnel) | Non prise en charge. | Non prise en charge. |
| Application | TeamsAppInstallation.ReadForChat.All | TeamsAppInstallation.ReadWriteSelfForChat.All, Chat. Gérer. Chat, TeamsAppInstallation.ManageSelectedForChat.All, TeamsAppInstallation.Read.All, TeamsAppInstallation.Read. Chat, TeamsAppInstallation.ReadWriteAndConsentForChat.All, TeamsAppInstallation.ReadWriteAndConsentSelfForChat.All, TeamsAppInstallation.ReadWriteForChat.All |
Remarque
Les autorisations suivantes utilisent un consentement spécifique à la ressource :
- TeamsAppInstallation.ReadWriteAndConsentSelfForChat
- TeamsAppInstallation.ReadWriteAndConsentForChat
- TeamsAppInstallation.ReadWriteAndConsentSelfForChat.All
- TeamsAppInstallation.ReadWriteAndConsentForChat.All
- TeamsAppInstallation.Read.Chat
- Chat.Manage.Chat
Requête HTTP
GET /chats/{chat-id}/installedApps
Paramètres facultatifs de la requête
Cette méthode prend en charge les paramètres de $filterrequête , $selectet $expandOData pour personnaliser la réponse.
En-têtes de demande
| En-tête | Valeur |
|---|---|
| Autorisation | Porteur {token}. Obligatoire. En savoir plus sur l’authentification et les autorisations. |
Corps de la demande
N’indiquez pas le corps de la demande pour cette méthode.
Réponse
Si elle réussit, cette méthode renvoie un code de réponse 200 OK et la collection d’objets teamsAppInstallation dans le corps de la réponse.
Exemples
Exemple 1 : Installer toutes les applications dans la conversation spécifiée
Demande
L’exemple suivant illustre une demande.
GET https://graph.microsoft.com/beta/chats/19%3Ad65713bc498c4a428c71ef9353e6ce20%40thread.v2/installedApps
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#chats('19%3Ad65713bc498c4a428c71ef9353e6ce20%40thread.v2')/installedApps",
"value": [
{
"id": "MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMwMDAwMTAxNi1kZTA1LTQ5MmUtOTEwNi00ODI4ZmM4YTg2ODc="
},
{
"id": "MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMwZDgyMGVjZC1kZWYyLTQyOTctYWRhZC03ODA1NmNkZTdjNzg="
},
{
"id": "MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMxYzQzNDBkZS0yYTg1LTQwZTUtOGViMC00ZjI5NTM2ODk3OGI="
}
]
}
Exemple 2 : Installer les noms et d’autres détails des applications installées dans la conversation spécifiée
Dans l’exemple suivant, si une instance d’une application installée a un robot associé, les détails du robot sont également renvoyés.
Demande
L’exemple suivant illustre une demande.
GET https://graph.microsoft.com/beta/chats/19%3Ad65713bc498c4a428c71ef9353e6ce20%40thread.v2/installedApps?$expand=teamsAppDefinition($expand=bot)
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#chats('19%3Ad65713bc498c4a428c71ef9353e6ce20%40thread.v2')/installedApps(teamsAppDefinition())",
"value": [
{
"id": "MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMwMDAwMTAxNi1kZTA1LTQ5MmUtOTEwNi00ODI4ZmM4YTg2ODc=",
"teamsAppDefinition": {
"id": "MDAwMDEwMTYtZGUwNS00OTJlLTkxMDYtNDgyOGZjOGE4Njg3IyMxLjAuMiMjUHVibGlzaGVk",
"teamsAppId": "00001016-de05-492e-9106-4828fc8a8687",
"azureADAppId": "7df0a125-d3be-4c96-aa54-591f83ff541c",
"displayName": "Power Automate Actions",
"version": "1.0.2",
"requiredResourceSpecificApplicationPermissions": [],
"publishingState": "published",
"shortdescription": "Be more productive with Microsoft Flow",
"description": "Automate time-consuming and repetitive tasks by integrating your favorite apps and services with Microsoft Power Automate.",
"lastModifiedDateTime": null,
"createdBy": null,
"bot": {
"id":"9a58a3ec-6b68-4818-ac11-844f1c326784"
}
}
},
{
"id": "MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMwZDgyMGVjZC1kZWYyLTQyOTctYWRhZC03ODA1NmNkZTdjNzg=",
"teamsAppDefinition": {
"id": "MGQ4MjBlY2QtZGVmMi00Mjk3LWFkYWQtNzgwNTZjZGU3Yzc4IyMxLjAuMCMjUHVibGlzaGVk",
"teamsAppId": "0d820ecd-def2-4297-adad-78056cde7c78",
"azureADAppId": "2d4d3d8e-2be3-4bef-9f87-7875a61c29de",
"displayName": "OneNote",
"version": "1.0.0",
"requiredResourceSpecificApplicationPermissions": [],
"publishingState": "published",
"shortdescription": "Capture and share ideas, to-do lists and other notes with your team.",
"description": "Capture and share ideas, to-do lists and other thoughts with your team. You can also co-author anytime.",
"lastModifiedDateTime": null,
"createdBy": null
}
},
{
"id": "MTk6ZDY1NzEzYmM0OThjNGE0MjhjNzFlZjkzNTNlNmNlMjBAdGhyZWFkLnYyIyMxYzQzNDBkZS0yYTg1LTQwZTUtOGViMC00ZjI5NTM2ODk3OGI=",
"teamsAppDefinition": {
"id": "MWM0MzQwZGUtMmE4NS00MGU1LThlYjAtNGYyOTUzNjg5NzhiIyMxLjMjI1B1Ymxpc2hlZA==",
"teamsAppId": "1c4340de-2a85-40e5-8eb0-4f295368978b",
"azureADAppId": null,
"displayName": "Power BI",
"version": "1.3",
"requiredResourceSpecificApplicationPermissions": [],
"publishingState": "published",
"shortdescription": "Easily see and chat about Power BI reports",
"description": "Pin Power BI reports to your channel to start a conversation about your data. With reports and chats in the same place, everyone stays on the same page.",
"lastModifiedDateTime": null,
"createdBy": null
}
}
]
}
Exemple 3 : Obtenir la ressource d’installation de l’application en fonction de l’ID de manifeste de l’application associée
Demande
L’exemple suivant illustre une demande. Dans l’exemple, l’ID de manifeste de l’application Teams est « cf1ba4c7-F94E-4d80-ba90-5594b641a8ee ».
GET https://graph.microsoft.com/beta/chats/19%3Ad65713bc498c4a428c71ef9353e6ce20%40thread.v2/installedApps?$expand=teamsApp,teamsAppDefinition&$filter=teamsApp/externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'
Réponse
L’exemple suivant illustre la réponse.
Remarque : l’objet de réponse affiché ci-après peut être raccourci pour plus de lisibilité.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.count": 1,
"value": [
{
"id": "NjkwM2ZhOTMtNjA1Yi00M2VmLTkyMGUtNzdjNDcyOWY4MjU4IyMwMjQwYTM2OC0yNWUwLTQ1NjktOGViZS0xMzYwMWNiNTVhMTg=",
"teamsApp": {
"id": "0240a368-25e0-4569-8ebe-13601cb55a18",
"externalId": "cf1ba4c7-f94e-4d80-ba90-5594b641a8ee",
"displayName": "YPA",
"distributionMethod": "sideloaded"
},
"teamsAppDefinition": {
"id": "MDI0MGEzNjgtMjVlMC00NTY5LThlYmUtMTM2MDFjYjU1YTE4IyM2LjAuMA==",
"teamsAppId": "0240a368-25e0-4569-8ebe-13601cb55a18",
"azureADAppId": "9fc97ea2-c417-4c76-a2db-197612067b28",
"displayName": "YPA",
"version": "6.0.0",
"requiredResourceSpecificApplicationPermissions": [
],
"publishingState": "published",
"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": null,
"createdBy": null
}
}
]
}
Exemple 4 : obtenir le consentement de l’ensemble des autorisations spécifiques aux ressources pour les applications installées dans la conversation spécifiée
L’exemple suivant obtient la liste de toutes les autorisations spécifiques aux ressources qui ont été accordées à une application dans le cadre de l’installation. Un $select paramètre de requête est nécessaire pour afficher l’ensemble d’autorisations consenti.
Demande
L’exemple suivant illustre une demande.
GET https://graph.microsoft.com/beta/chats/19%5bd86ec7f6b247d3b9e519b0bfef5d03%40thread.v2/installedApps?$select=consentedPermissionSet,id
Réponse
L’exemple suivant illustre la réponse.
Remarque : l’objet de réponse affiché ci-après peut être raccourci pour plus de lisibilité.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/chats('19%3A5bd86ec7f6b247d3b9e519b0bfef5d03%40thread.v2')/installedApps(consentedPermissionSet,id)",
"value": [
{
"id": "MTk6NWJkODZlYzdmNmIyNDdkM2I5ZTUxOWIwYmZlZjVkMDNAdGhyZWFkLnYyIyM0ZTVhNmMzYy1jOTU5LTRiY2EtOGRiNy0wMGRiM2E0ODdjZTE=",
"consentedPermissionSet": {
"resourceSpecificPermissions": [
{
"permissionValue": "ChatMessage.Read.Chat",
"permissionType": "application"
}
]
}
},
{
"id": "MTk6NWJkODZlYzdmNmIyNDdkM2I5ZTUxOWIwYmZlZjVkMDNAdGhyZWFkLnYyIyMyYjUyNGUyOC05NWNlLTRjOWItOTc3My00YTViZDZlYzE3NzA=",
"consentedPermissionSet": {
"resourceSpecificPermissions": [
{
"permissionValue": "OnlineMeeting.ReadBasic.Chat",
"permissionType": "delegated"
},
{
"permissionValue": "OnlineMeetingIncomingAudio.Detect.Chat",
"permissionType": "delegated"
}
]
}
}
]
}