Aktualisieren von emailAuthenticationMethodConfiguration
Artikel
Namespace: microsoft.graph
Aktualisieren Sie die Eigenschaften eines emailAuthenticationMethodConfiguration-Objekts, das die Richtlinie für die E-Mail-OTP-Authentifizierungsmethode für den Microsoft Entra Mandanten darstellt.
Wählen Sie für diese API die Als am wenigsten privilegierten Berechtigungen gekennzeichneten Berechtigungen aus. Verwenden Sie nur dann eine Berechtigung mit höheren Berechtigungen , wenn dies für Ihre App erforderlich ist. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
Berechtigungstyp
Berechtigungen mit den geringsten Berechtigungen
Berechtigungen mit höheren Berechtigungen
Delegiert (Geschäfts-, Schul- oder Unikonto)
Policy.ReadWrite.AuthenticationMethod
Nicht verfügbar.
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Nicht unterstützt
Anwendung
Policy.ReadWrite.AuthenticationMethod
Nicht verfügbar.
Für delegierte Szenarien benötigt der Administrator mindestens die Rolle AuthentifizierungsrichtlinienadministratorMicrosoft Entra.
Geben Sie im Anforderungstext eine JSON-Darstellung des emailAuthenticationMethodConfiguration-Objekts an . Vorhandene Eigenschaften, die nicht im Anforderungstext enthalten sind, behalten ihre vorherigen Werte oder werden basierend auf Änderungen an anderen Eigenschaftswerten neu berechnet. Geben Sie aus Gründen der Leistung vorhandene Werte, die nicht geändert wurden, nicht an.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new EmailAuthenticationMethodConfiguration
{
OdataType = "#microsoft.graph.emailAuthenticationMethodConfiguration",
AllowExternalIdToUseEmailOtp = ExternalEmailOtpState.Enabled,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Policies.AuthenticationMethodsPolicy.AuthenticationMethodConfigurations["{authenticationMethodConfiguration-id}"].PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc policies authentication-methods-policy authentication-method-configurations patch --authentication-method-configuration-id {authenticationMethodConfiguration-id} --body '{\
"@odata.type": "#microsoft.graph.emailAuthenticationMethodConfiguration",\
"allowExternalIdToUseEmailOtp": "enabled",\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EmailAuthenticationMethodConfiguration authenticationMethodConfiguration = new EmailAuthenticationMethodConfiguration();
authenticationMethodConfiguration.setOdataType("#microsoft.graph.emailAuthenticationMethodConfiguration");
authenticationMethodConfiguration.setAllowExternalIdToUseEmailOtp(ExternalEmailOtpState.Enabled);
AuthenticationMethodConfiguration result = graphClient.policies().authenticationMethodsPolicy().authenticationMethodConfigurations().byAuthenticationMethodConfigurationId("{authenticationMethodConfiguration-id}").patch(authenticationMethodConfiguration);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\EmailAuthenticationMethodConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new EmailAuthenticationMethodConfiguration();
$requestBody->setOdataType('#microsoft.graph.emailAuthenticationMethodConfiguration');
$requestBody->setAllowExternalIdToUseEmailOtp(new ExternalEmailOtpState('enabled'));
$result = $graphServiceClient->policies()->authenticationMethodsPolicy()->authenticationMethodConfigurations()->byAuthenticationMethodConfigurationId('authenticationMethodConfiguration-id')->patch($requestBody)->wait();
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unter https://aka.ms/ContentUserFeedback.