Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
En el cuerpo de la solicitud, proporcione solo los valores de las propiedades que se van a actualizar. Las propiedades existentes que no se incluyen en el cuerpo de la solicitud mantienen sus valores anteriores o se recalculan en función de los cambios realizados en otros valores de propiedad.
En la tabla siguiente se especifican las propiedades que se pueden actualizar.
Propiedad
Tipo
Descripción
allowUserRequestsForAppAccess
Booleano
Indica si los usuarios pueden solicitar acceso a las aplicaciones de Teams no disponibles.
isUserPersonalScopeResourceSpecificConsentEnabled
Booleano
Indica si el consentimiento específico de recursos para el ámbito personal en las aplicaciones de Teams está habilitado para el inquilino.
True indica que las aplicaciones de Teams que se permiten en el inquilino y requieren permisos específicos de recursos se pueden instalar en el ámbito personal.
False bloquea la instalación de cualquier aplicación de Teams que requiera permisos específicos de recursos en el ámbito personal.
Respuesta
Si se ejecuta correctamente, este método devuelve un código de respuesta 204 No Content.
Ejemplos
Ejemplo 1: Permitir que los usuarios de Teams soliciten a los administradores acceso a determinadas aplicaciones de 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)