Teams アプリの個人用スコープに対するリソース固有の同意がテナントに対して有効かどうかを示します。 True は、テナントで許可され、リソース固有のアクセス許可を必要とする Teams アプリを個人用スコープにインストールできることを示します。 False は、個人用スコープ内のリソース固有のアクセス許可を必要とする Teams アプリのインストールをブロックします。
応答
成功した場合、このメソッドは 204 No Content 応答コードを返します。
例
例 1: Teams ユーザーが特定の Teams アプリへのアクセスを管理者に要求できるようにする
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new TeamsAppSettings
{
OdataType = "#microsoft.graph.teamsAppSettings",
AllowUserRequestsForAppAccess = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teamwork.TeamsAppSettings.PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc teamwork teams-app-settings patch --body '{\
"@odata.type": "#microsoft.graph.teamsAppSettings",\
"allowUserRequestsForAppAccess": "true"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppSettings teamsAppSettings = new TeamsAppSettings();
teamsAppSettings.setOdataType("#microsoft.graph.teamsAppSettings");
teamsAppSettings.setAllowUserRequestsForAppAccess(true);
TeamsAppSettings result = graphClient.teamwork().teamsAppSettings().patch(teamsAppSettings);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\TeamsAppSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TeamsAppSettings();
$requestBody->setOdataType('#microsoft.graph.teamsAppSettings');
$requestBody->setAllowUserRequestsForAppAccess(true);
$result = $graphServiceClient->teamwork()->teamsAppSettings()->patch($requestBody)->wait();
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new TeamsAppSettings
{
OdataType = "#microsoft.graph.teamsAppSettings",
IsUserPersonalScopeResourceSpecificConsentEnabled = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Teamwork.TeamsAppSettings.PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc teamwork teams-app-settings patch --body '{\
"@odata.type": "#microsoft.graph.teamsAppSettings",\
"isUserPersonalScopeResourceSpecificConsentEnabled": true\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TeamsAppSettings teamsAppSettings = new TeamsAppSettings();
teamsAppSettings.setOdataType("#microsoft.graph.teamsAppSettings");
teamsAppSettings.setIsUserPersonalScopeResourceSpecificConsentEnabled(true);
TeamsAppSettings result = graphClient.teamwork().teamsAppSettings().patch(teamsAppSettings);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\TeamsAppSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TeamsAppSettings();
$requestBody->setOdataType('#microsoft.graph.teamsAppSettings');
$requestBody->setIsUserPersonalScopeResourceSpecificConsentEnabled(true);
$result = $graphServiceClient->teamwork()->teamsAppSettings()->patch($requestBody)->wait();