Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Retrieve the list of apps installed in the personal scope of the specified user.
Notes:
- The
id
of a teamsAppInstallation resource is not the same value as the id
of the associated teamsApp resource.
- This API works differently in one or more national clouds. For details, see Implementation differences in national clouds.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
✅ |
✅ |
❌ |
Permissions
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type |
Least privileged permissions |
Higher privileged permissions |
Delegated (work or school account) |
TeamsAppInstallation.ReadForUser |
TeamsAppInstallation.ReadWriteSelfForUser, TeamsAppInstallation.ManageSelectedForUser, TeamsAppInstallation.ReadWriteAndConsentForUser, TeamsAppInstallation.ReadWriteAndConsentSelfForUser, TeamsAppInstallation.ReadWriteForUser, TeamsAppInstallation.ReadWriteSelectedForUser |
Delegated (personal Microsoft account) |
Not supported. |
Not supported. |
Application |
TeamsAppInstallation.ReadForUser.All |
TeamsAppInstallation.ReadWriteSelfForUser.All, TeamsAppInstallation.ManageSelectedForUser.All, TeamsAppInstallation.Read.All, TeamsAppInstallation.Read.User, TeamsAppInstallation.ReadWriteAndConsentForUser.All, TeamsAppInstallation.ReadWriteAndConsentSelfForUser.All, TeamsAppInstallation.ReadWriteForUser.All, TeamsAppInstallation.ReadWriteSelectedForUser.All |
Note
If you plan to use the TeamsAppInstallation.ReadWriteSelfForUser.All permission, the following are required:
- The app manifest must have the webApplicationInfo property.
- The app id given in the webApplicationInfo property and the app id used to generate the access token must match. Otherwise, the API returns an empty result.
HTTP request
GET /users/{user-id | user-principal-name}/teamwork/installedApps
Optional query parameters
This method supports the $filter
, $select
, and $expand
OData query parameters to help customize the response.
Request body
Don't supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and a collection of teamsAppInstallation objects in the response body.
Examples
Example 1: List apps installed for the specified user
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/users/{id}/teamwork/installedApps
// 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.Users["{user-id}"].Teamwork.InstalledApps.GetAsync();
mgc-beta users teamwork installed-apps list --user-id {user-id}
// 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
installedApps, err := graphClient.Users().ByUserId("user-id").Teamwork().InstalledApps().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
UserScopeTeamsAppInstallationCollectionResponse result = graphClient.users().byUserId("{user-id}").teamwork().installedApps().get();
const options = {
authProvider,
};
const client = Client.init(options);
let installedApps = await client.api('/users/{id}/teamwork/installedApps')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->users()->byUserId('user-id')->teamwork()->installedApps()->get()->wait();
Import-Module Microsoft.Graph.Beta.Teams
Get-MgBetaUserTeamworkInstalledApp -UserId $userId
# 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.users.by_user_id('user-id').teamwork.installed_apps.get()
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "NjRiOWM3NDYtYjE1NS00MDQyLThkNDctOTQxYmQzODE2ODFiIyMwZDgyMGVjZC1kZWYyLTQyOTctYWRhZC03ODA1NmNkZTdjNzg="
},
{
"id": "NjRiOWM3NDYtYjE1NS00MDQyLThkNDctOTQxYmQzODE2ODFiIyMwZmQ5MjVhMC0zNTdmLTRkMjUtODQ1Ni1iMzAyMmFhYTQxYTk="
}
]
}
Example 2: Get the names and other details of apps installed for the user
Request
In the following example, if an instance of an installed app has a bot associated with it, then the details of the bot are returned as well.
GET https://graph.microsoft.com/beta/users/{id}/teamwork/installedApps?$expand=teamsAppDefinition($expand=bot)
// 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.Users["{user-id}"].Teamwork.InstalledApps.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Expand = new string []{ "teamsAppDefinition($expand=bot)" };
});
mgc-beta users teamwork installed-apps list --user-id {user-id} --expand "teamsAppDefinition(\$expand=bot)"
// 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"
graphusers "github.com/microsoftgraph/msgraph-beta-sdk-go/users"
//other-imports
)
requestParameters := &graphusers.ItemTeamworkInstalledAppsRequestBuilderGetQueryParameters{
Expand: [] string {"teamsAppDefinition($expand=bot)"},
}
configuration := &graphusers.ItemTeamworkInstalledAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
installedApps, err := graphClient.Users().ByUserId("user-id").Teamwork().InstalledApps().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
UserScopeTeamsAppInstallationCollectionResponse result = graphClient.users().byUserId("{user-id}").teamwork().installedApps().get(requestConfiguration -> {
requestConfiguration.queryParameters.expand = new String []{"teamsAppDefinition($expand=bot)"};
});
const options = {
authProvider,
};
const client = Client.init(options);
let installedApps = await client.api('/users/{id}/teamwork/installedApps')
.version('beta')
.expand('teamsAppDefinition($expand=bot)')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Users\Item\Teamwork\InstalledApps\InstalledAppsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new InstalledAppsRequestBuilderGetRequestConfiguration();
$queryParameters = InstalledAppsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->expand = ["teamsAppDefinition(\$expand=bot)"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->users()->byUserId('user-id')->teamwork()->installedApps()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Teams
Get-MgBetaUserTeamworkInstalledApp -UserId $userId -ExpandProperty "teamsAppDefinition(`$expand=bot)"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.users.item.teamwork.installed_apps.installed_apps_request_builder import InstalledAppsRequestBuilder
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 = InstalledAppsRequestBuilder.InstalledAppsRequestBuilderGetQueryParameters(
expand = ["teamsAppDefinition($expand=bot)"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.users.by_user_id('user-id').teamwork.installed_apps.get(request_configuration = request_configuration)
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "NjRiOWM3NDYtYjE1NS00MDQyLThkNDctOTQxYmQzODE2ODFiIyMwZDgyMGVjZC1kZWYyLTQyOTctYWRhZC03ODA1NmNkZTdjNzg=",
"teamsAppDefinition": {
"id": "MGQ4MjBlY2QtZGVmMi00Mjk3LWFkYWQtNzgwNTZjZGU3Yzc4IyMxLjAuMA==",
"teamsAppId": "0d820ecd-def2-4297-adad-78056cde7c78",
"displayName": "OneNote",
"version": "1.0.0"
}
},
{
"id": "NjRiOWM3NDYtYjE1NS00MDQyLThkNDctOTQxYmQzODE2ODFiIyMwZmQ5MjVhMC0zNTdmLTRkMjUtODQ1Ni1iMzAyMmFhYTQxYTk=",
"teamsAppDefinition": {
"id": "MGZkOTI1YTAtMzU3Zi00ZDI1LTg0NTYtYjMwMjJhYWE0MWE5IyMxLjc=",
"teamsAppId": "0fd925a0-357f-4d25-8456-b3022aaa41a9",
"displayName": "SurveyMonkey",
"version": "1.7",
"bot": {
"id":"793a57f9-a795-4264-bf8d-3d90585a4d1f"
}
}
},
{
"id": "NjRiOWM3NDYtYjE1NS00MDQyLThkNDctOTQxYmQzODE2ODFiIyMyYTUyNzcwMy0xZjZmLTQ1NTktYTMzMi1kOGE3ZDI4OGNkODg=",
"teamsAppDefinition": {
"id": "MmE1Mjc3MDMtMWY2Zi00NTU5LWEzMzItZDhhN2QyODhjZDg4IyMxLjA=",
"teamsAppId": "2a527703-1f6f-4559-a332-d8a7d288cd88",
"displayName": "SharePoint",
"version": "1.0"
}
}
]
}
Example 3: Get the app installation resource based on the manifest ID of the associated app
Request
The following example shows a request. In the example, the manifest ID of the Teams app is 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'.
GET https://graph.microsoft.com/beta/users/97a5a533-833d-494b-b543-c0afe026cb96/teamwork/installedApps?$expand=teamsApp,teamsAppDefinition&$filter=teamsApp/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.Users["{user-id}"].Teamwork.InstalledApps.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Expand = new string []{ "teamsApp","teamsAppDefinition" };
requestConfiguration.QueryParameters.Filter = "teamsApp/externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'";
});
mgc-beta users teamwork installed-apps list --user-id {user-id} --filter "teamsApp/externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'" --expand "teamsApp,teamsAppDefinition"
// 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"
graphusers "github.com/microsoftgraph/msgraph-beta-sdk-go/users"
//other-imports
)
requestFilter := "teamsApp/externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'"
requestParameters := &graphusers.ItemTeamworkInstalledAppsRequestBuilderGetQueryParameters{
Expand: [] string {"teamsApp","teamsAppDefinition"},
Filter: &requestFilter,
}
configuration := &graphusers.ItemTeamworkInstalledAppsRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
installedApps, err := graphClient.Users().ByUserId("user-id").Teamwork().InstalledApps().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
UserScopeTeamsAppInstallationCollectionResponse result = graphClient.users().byUserId("{user-id}").teamwork().installedApps().get(requestConfiguration -> {
requestConfiguration.queryParameters.expand = new String []{"teamsApp", "teamsAppDefinition"};
requestConfiguration.queryParameters.filter = "teamsApp/externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'";
});
const options = {
authProvider,
};
const client = Client.init(options);
let installedApps = await client.api('/users/97a5a533-833d-494b-b543-c0afe026cb96/teamwork/installedApps')
.version('beta')
.filter('teamsApp/externalId eq \'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee\'')
.expand('teamsApp,teamsAppDefinition')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Users\Item\Teamwork\InstalledApps\InstalledAppsRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new InstalledAppsRequestBuilderGetRequestConfiguration();
$queryParameters = InstalledAppsRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->expand = ["teamsApp","teamsAppDefinition"];
$queryParameters->filter = "teamsApp/externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->users()->byUserId('user-id')->teamwork()->installedApps()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Teams
Get-MgBetaUserTeamworkInstalledApp -UserId $userId -ExpandProperty "teamsApp,teamsAppDefinition" -Filter "teamsApp/externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.users.item.teamwork.installed_apps.installed_apps_request_builder import InstalledAppsRequestBuilder
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 = InstalledAppsRequestBuilder.InstalledAppsRequestBuilderGetQueryParameters(
expand = ["teamsApp","teamsAppDefinition"],
filter = "teamsApp/externalId eq 'cf1ba4c7-f94e-4d80-ba90-5594b641a8ee'",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.users.by_user_id('user-id').teamwork.installed_apps.get(request_configuration = request_configuration)
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
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
}
}
]
}
Related content