POST https://graph.microsoft.com/beta/teams/87654321-0abc-zqf0-321456789q/installedApps
Content-type: application/json
{
"teamsApp@odata.bind":"https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new TeamsAppInstallation
{
AdditionalData = new Dictionary<string, object>
{
{
"teamsApp@odata.bind" , "https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teams["{team-id}"].InstalledApps.PostAsync(requestBody);
mgc-beta teams installed-apps create --team-id {team-id} --body '{\
"teamsApp@odata.bind":"https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a"\
}\
'
// 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"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewTeamsAppInstallation()
additionalData := map[string]interface{}{
"teamsApp@odata.bind" : "https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a",
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
installedApps, err := graphClient.Teams().ByTeamId("team-id").InstalledApps().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppInstallation teamsAppInstallation = new TeamsAppInstallation();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("teamsApp@odata.bind", "https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a");
teamsAppInstallation.setAdditionalData(additionalData);
TeamsAppInstallation result = graphClient.teams().byTeamId("{team-id}").installedApps().post(teamsAppInstallation);
const options = {
authProvider,
};
const client = Client.init(options);
const teamsAppInstallation = {
'teamsApp@odata.bind':'https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a'
};
await client.api('/teams/87654321-0abc-zqf0-321456789q/installedApps')
.version('beta')
.post(teamsAppInstallation);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\TeamsAppInstallation;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TeamsAppInstallation();
$additionalData = [
'teamsApp@odata.bind' => 'https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a',
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->teams()->byTeamId('team-id')->installedApps()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Teams
$params = @{
"teamsApp@odata.bind" = "https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a"
}
New-MgBetaTeamInstalledApp -TeamId $teamId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.teams_app_installation import TeamsAppInstallation
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TeamsAppInstallation(
additional_data = {
"teams_app@odata_bind" : "https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a",
}
)
result = await graph_client.teams.by_team_id('team-id').installed_apps.post(request_body)
POST https://graph.microsoft.com/beta/teams/7023576d-9e40-47ca-9cf2-daae6838e785/installedApps
Content-Type: application/json
{
"teamsApp@odata.bind" : "https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785",
"consentedPermissionSet": {
"resourceSpecificPermissions": [
{
"permissionValue": "OnlineMeeting.ReadBasic.Chat",
"permissionType": "delegated"
},
{
"permissionValue": "ChatMessage.Read.Chat",
"permissionType": "application"
}]
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new TeamsAppInstallation
{
ConsentedPermissionSet = new TeamsAppPermissionSet
{
ResourceSpecificPermissions = new List<TeamsAppResourceSpecificPermission>
{
new TeamsAppResourceSpecificPermission
{
PermissionValue = "OnlineMeeting.ReadBasic.Chat",
PermissionType = TeamsAppResourceSpecificPermissionType.Delegated,
},
new TeamsAppResourceSpecificPermission
{
PermissionValue = "ChatMessage.Read.Chat",
PermissionType = TeamsAppResourceSpecificPermissionType.Application,
},
},
},
AdditionalData = new Dictionary<string, object>
{
{
"teamsApp@odata.bind" , "https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teams["{team-id}"].InstalledApps.PostAsync(requestBody);
mgc-beta teams installed-apps create --team-id {team-id} --body '{\
"teamsApp@odata.bind" : "https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785",\
"consentedPermissionSet": {\
"resourceSpecificPermissions": [\
{\
"permissionValue": "OnlineMeeting.ReadBasic.Chat",\
"permissionType": "delegated"\
},\
{\
"permissionValue": "ChatMessage.Read.Chat",\
"permissionType": "application"\
}]\
}\
}\
'
// 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"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewTeamsAppInstallation()
consentedPermissionSet := graphmodels.NewTeamsAppPermissionSet()
teamsAppResourceSpecificPermission := graphmodels.NewTeamsAppResourceSpecificPermission()
permissionValue := "OnlineMeeting.ReadBasic.Chat"
teamsAppResourceSpecificPermission.SetPermissionValue(&permissionValue)
permissionType := graphmodels.DELEGATED_TEAMSAPPRESOURCESPECIFICPERMISSIONTYPE
teamsAppResourceSpecificPermission.SetPermissionType(&permissionType)
teamsAppResourceSpecificPermission1 := graphmodels.NewTeamsAppResourceSpecificPermission()
permissionValue := "ChatMessage.Read.Chat"
teamsAppResourceSpecificPermission1.SetPermissionValue(&permissionValue)
permissionType := graphmodels.APPLICATION_TEAMSAPPRESOURCESPECIFICPERMISSIONTYPE
teamsAppResourceSpecificPermission1.SetPermissionType(&permissionType)
resourceSpecificPermissions := []graphmodels.TeamsAppResourceSpecificPermissionable {
teamsAppResourceSpecificPermission,
teamsAppResourceSpecificPermission1,
}
consentedPermissionSet.SetResourceSpecificPermissions(resourceSpecificPermissions)
requestBody.SetConsentedPermissionSet(consentedPermissionSet)
additionalData := map[string]interface{}{
"teamsApp@odata.bind" : "https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785",
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
installedApps, err := graphClient.Teams().ByTeamId("team-id").InstalledApps().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppInstallation teamsAppInstallation = new TeamsAppInstallation();
TeamsAppPermissionSet consentedPermissionSet = new TeamsAppPermissionSet();
LinkedList<TeamsAppResourceSpecificPermission> resourceSpecificPermissions = new LinkedList<TeamsAppResourceSpecificPermission>();
TeamsAppResourceSpecificPermission teamsAppResourceSpecificPermission = new TeamsAppResourceSpecificPermission();
teamsAppResourceSpecificPermission.setPermissionValue("OnlineMeeting.ReadBasic.Chat");
teamsAppResourceSpecificPermission.setPermissionType(TeamsAppResourceSpecificPermissionType.Delegated);
resourceSpecificPermissions.add(teamsAppResourceSpecificPermission);
TeamsAppResourceSpecificPermission teamsAppResourceSpecificPermission1 = new TeamsAppResourceSpecificPermission();
teamsAppResourceSpecificPermission1.setPermissionValue("ChatMessage.Read.Chat");
teamsAppResourceSpecificPermission1.setPermissionType(TeamsAppResourceSpecificPermissionType.Application);
resourceSpecificPermissions.add(teamsAppResourceSpecificPermission1);
consentedPermissionSet.setResourceSpecificPermissions(resourceSpecificPermissions);
teamsAppInstallation.setConsentedPermissionSet(consentedPermissionSet);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("teamsApp@odata.bind", "https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785");
teamsAppInstallation.setAdditionalData(additionalData);
TeamsAppInstallation result = graphClient.teams().byTeamId("{team-id}").installedApps().post(teamsAppInstallation);
const options = {
authProvider,
};
const client = Client.init(options);
const teamsAppInstallation = {
'teamsApp@odata.bind': 'https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785',
consentedPermissionSet: {
resourceSpecificPermissions: [
{
permissionValue: 'OnlineMeeting.ReadBasic.Chat',
permissionType: 'delegated'
},
{
permissionValue: 'ChatMessage.Read.Chat',
permissionType: 'application'
}]
}
};
await client.api('/teams/7023576d-9e40-47ca-9cf2-daae6838e785/installedApps')
.version('beta')
.post(teamsAppInstallation);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\TeamsAppInstallation;
use Microsoft\Graph\Beta\Generated\Models\TeamsAppPermissionSet;
use Microsoft\Graph\Beta\Generated\Models\TeamsAppResourceSpecificPermission;
use Microsoft\Graph\Beta\Generated\Models\TeamsAppResourceSpecificPermissionType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TeamsAppInstallation();
$consentedPermissionSet = new TeamsAppPermissionSet();
$resourceSpecificPermissionsTeamsAppResourceSpecificPermission1 = new TeamsAppResourceSpecificPermission();
$resourceSpecificPermissionsTeamsAppResourceSpecificPermission1->setPermissionValue('OnlineMeeting.ReadBasic.Chat');
$resourceSpecificPermissionsTeamsAppResourceSpecificPermission1->setPermissionType(new TeamsAppResourceSpecificPermissionType('delegated'));
$resourceSpecificPermissionsArray []= $resourceSpecificPermissionsTeamsAppResourceSpecificPermission1;
$resourceSpecificPermissionsTeamsAppResourceSpecificPermission2 = new TeamsAppResourceSpecificPermission();
$resourceSpecificPermissionsTeamsAppResourceSpecificPermission2->setPermissionValue('ChatMessage.Read.Chat');
$resourceSpecificPermissionsTeamsAppResourceSpecificPermission2->setPermissionType(new TeamsAppResourceSpecificPermissionType('application'));
$resourceSpecificPermissionsArray []= $resourceSpecificPermissionsTeamsAppResourceSpecificPermission2;
$consentedPermissionSet->setResourceSpecificPermissions($resourceSpecificPermissionsArray);
$requestBody->setConsentedPermissionSet($consentedPermissionSet);
$additionalData = [
'teamsApp@odata.bind' => 'https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785',
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->teams()->byTeamId('team-id')->installedApps()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Teams
$params = @{
"teamsApp@odata.bind" = "https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785"
consentedPermissionSet = @{
resourceSpecificPermissions = @(
@{
permissionValue = "OnlineMeeting.ReadBasic.Chat"
permissionType = "delegated"
}
@{
permissionValue = "ChatMessage.Read.Chat"
permissionType = "application"
}
)
}
}
New-MgBetaTeamInstalledApp -TeamId $teamId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.teams_app_installation import TeamsAppInstallation
from msgraph_beta.generated.models.teams_app_permission_set import TeamsAppPermissionSet
from msgraph_beta.generated.models.teams_app_resource_specific_permission import TeamsAppResourceSpecificPermission
from msgraph_beta.generated.models.teams_app_resource_specific_permission_type import TeamsAppResourceSpecificPermissionType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TeamsAppInstallation(
consented_permission_set = TeamsAppPermissionSet(
resource_specific_permissions = [
TeamsAppResourceSpecificPermission(
permission_value = "OnlineMeeting.ReadBasic.Chat",
permission_type = TeamsAppResourceSpecificPermissionType.Delegated,
),
TeamsAppResourceSpecificPermission(
permission_value = "ChatMessage.Read.Chat",
permission_type = TeamsAppResourceSpecificPermissionType.Application,
),
],
),
additional_data = {
"teams_app@odata_bind" : "https://graph.microsoft.com/beta/appCatalogs/teamsApps/7023576d-9e40-47ca-9cf2-daae6838e785",
}
)
result = await graph_client.teams.by_team_id('team-id').installed_apps.post(request_body)