Escolha a permissão ou permissões marcadas como menos privilegiadas para esta API. Utilize uma permissão ou permissões com privilégios mais elevados apenas se a sua aplicação o exigir. Para obter detalhes sobre as permissões delegadas e de aplicação, veja Tipos de permissão. Para saber mais sobre estas permissões, veja a referência de permissões.
No corpo do pedido, forneça apenas os valores das propriedades a atualizar. As propriedades existentes que não estão incluídas no corpo do pedido mantêm os valores anteriores ou são recalculadas com base em alterações a outros valores de propriedade.
A tabela a seguir especifica as propriedades que podem ser atualizadas.
Propriedade
Tipo
Descrição
allowUserRequestsForAppAccess
Booliano
Indica se os utilizadores têm permissão para pedir acesso às aplicações do Teams indisponíveis.
isUserPersonalScopeResourceSpecificConsentEnabled
Booliano
Indica se o consentimento específico do recurso para o âmbito pessoal nas aplicações do Teams está ativado para o inquilino.
True indica que as aplicações do Teams que são permitidas no inquilino e que necessitam de permissões específicas de recursos podem ser instaladas no âmbito pessoal.
False bloqueia a instalação de qualquer aplicação do Teams que necessite de permissões específicas de recursos no âmbito pessoal.
Resposta
Se tiver êxito, este método retornará um código de resposta 204 No Content.
Exemplos
Exemplo 1: Permitir que os utilizadores do Teams peçam aos administradores acesso a determinadas aplicações do 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);
// 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"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewTeamsAppSettings()
allowUserRequestsForAppAccess := true
requestBody.SetAllowUserRequestsForAppAccess(&allowUserRequestsForAppAccess)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamsAppSettings, err := graphClient.Teamwork().TeamsAppSettings().Patch(context.Background(), requestBody, nil)
// 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 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.teams_app_settings import TeamsAppSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TeamsAppSettings(
odata_type = "#microsoft.graph.teamsAppSettings",
allow_user_requests_for_app_access = True,
)
result = await graph_client.teamwork.teams_app_settings.patch(request_body)
// 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);
// 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"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewTeamsAppSettings()
isUserPersonalScopeResourceSpecificConsentEnabled := true
requestBody.SetIsUserPersonalScopeResourceSpecificConsentEnabled(&isUserPersonalScopeResourceSpecificConsentEnabled)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
teamsAppSettings, err := graphClient.Teamwork().TeamsAppSettings().Patch(context.Background(), requestBody, nil)
// 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();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.teams_app_settings import TeamsAppSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TeamsAppSettings(
odata_type = "#microsoft.graph.teamsAppSettings",
is_user_personal_scope_resource_specific_consent_enabled = True,
)
result = await graph_client.teamwork.teams_app_settings.patch(request_body)