この認証強度ポリシーで許可される認証方法の組み合わせ。 このフラグ付き列挙型の使用可能な値は、、、、、、softwareOath、、deviceBasedPushfederatedSingleFactortemporaryAccessPassMultiUsetemporaryAccessPassOneTimex509CertificateSingleFactorwindowsHelloForBusinessx509CertificateMultiFactoremailmicrosoftAuthenticatorPushsmsfido2、 unknownFutureValuefederatedMultiFactorです。 hardwareOathvoicepassword 許可される組み合わせの一覧については、 List authenticationMethodModes API を呼び出します。 必須です。
POST https://graph.microsoft.com/beta/policies/authenticationStrengthPolicies
Content-Type: application/json
Content-length: 239
{
"@odata.type" : "#microsoft.graph.authenticationStrengthPolicy",
"displayName": "Contoso authentication level",
"description": "The only authentication level allowed to access our secret apps",
"allowedCombinations": [
"password, hardwareOath",
"password, sms"
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new AuthenticationStrengthPolicy
{
OdataType = "#microsoft.graph.authenticationStrengthPolicy",
DisplayName = "Contoso authentication level",
Description = "The only authentication level allowed to access our secret apps",
AllowedCombinations = new List<AuthenticationMethodModes?>
{
AuthenticationMethodModes.Password | AuthenticationMethodModes.HardwareOath,
AuthenticationMethodModes.Password | AuthenticationMethodModes.Sms,
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Policies.AuthenticationStrengthPolicies.PostAsync(requestBody);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta policies authentication-strength-policies create --body '{\
"@odata.type" : "#microsoft.graph.authenticationStrengthPolicy",\
"displayName": "Contoso authentication level",\
"description": "The only authentication level allowed to access our secret apps",\
"allowedCombinations": [\
"password, hardwareOath",\
"password, sms"\
]\
}\
'
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AuthenticationStrengthPolicy authenticationStrengthPolicy = new AuthenticationStrengthPolicy();
authenticationStrengthPolicy.setOdataType("#microsoft.graph.authenticationStrengthPolicy");
authenticationStrengthPolicy.setDisplayName("Contoso authentication level");
authenticationStrengthPolicy.setDescription("The only authentication level allowed to access our secret apps");
LinkedList<AuthenticationMethodModes> allowedCombinations = new LinkedList<AuthenticationMethodModes>();
allowedCombinations.add(AuthenticationMethodModes.Password);
allowedCombinations.add(AuthenticationMethodModes.HardwareOath);
allowedCombinations.add(AuthenticationMethodModes.Password);
allowedCombinations.add(AuthenticationMethodModes.Sms);
authenticationStrengthPolicy.setAllowedCombinations(allowedCombinations);
AuthenticationStrengthPolicy result = graphClient.policies().authenticationStrengthPolicies().post(authenticationStrengthPolicy);
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\AuthenticationStrengthPolicy;
use Microsoft\Graph\Generated\Models\AuthenticationMethodModes;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AuthenticationStrengthPolicy();
$requestBody->setOdataType('#microsoft.graph.authenticationStrengthPolicy');
$requestBody->setDisplayName('Contoso authentication level');
$requestBody->setDescription('The only authentication level allowed to access our secret apps');
$requestBody->setAllowedCombinations([new AuthenticationMethodModes('password, hardwareOath'),new AuthenticationMethodModes('password, sms'), ]);
$result = $graphServiceClient->policies()->authenticationStrengthPolicies()->post($requestBody)->wait();
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。
from msgraph import GraphServiceClient
from msgraph.generated.models.authentication_strength_policy import AuthenticationStrengthPolicy
from msgraph.generated.models.authentication_method_modes import AuthenticationMethodModes
graph_client = GraphServiceClient(credentials, scopes)
request_body = AuthenticationStrengthPolicy(
odata_type = "#microsoft.graph.authenticationStrengthPolicy",
display_name = "Contoso authentication level",
description = "The only authentication level allowed to access our secret apps",
allowed_combinations = [
AuthenticationMethodModes.Password | AuthenticationMethodModes.HardwareOath,
AuthenticationMethodModes.Password | AuthenticationMethodModes.Sms,
],
)
result = await graph_client.policies.authentication_strength_policies.post(request_body)
重要
Microsoft Graph SDK では、既定で v1.0 バージョンの API が使用され、ベータ版で使用可能なすべての型、プロパティ、API がサポートされているわけではありません。 SDK を使用してベータ API にアクセスする方法の詳細については、「ベータ API で Microsoft Graph SDK を使用する」を参照してください。