riskyUser: dismiss
[アーティクル]
01/20/2022
2 人の共同作成者
この記事の内容
名前空間: microsoft.graph
注: riskyUsers API を使用するには、ライセンスAzure AD Premium P2必要です。
1 つ以上の危険な User オブジェクトのリスクを削除 します。 このアクションは、対象ユーザーのリスク レベルを none に設定します。
アクセス許可
この API を呼び出すには、次のいずれかのアクセス許可が必要です。アクセス許可の選択方法などの詳細については、「アクセス許可 」を参照してください。
アクセス許可の種類
アクセス許可 (特権の小さいものから大きいものへ)
委任 (職場または学校のアカウント)
IdentityRiskyUser.ReadWrite.All
委任 (個人用 Microsoft アカウント)
サポートされていません。
アプリケーション
IdentityRiskyUser.ReadWrite.All
HTTP 要求
POST /identityProtection/riskyUsers/dismiss
名前
説明
Authorization
ベアラー {token}。必須。
Content-Type
application/json. Required.
要求本文
要求本文で、パラメーターの JSON 表記を指定します。
次の表に、このアクションで使用できるパラメーターを示します。
パラメーター
型
説明
userIds
String collection
要求本文で閉じる userId を指定します。
応答
成功した場合、このアクションは 204 No Content 応答コードを返します。
例
要求
POST https://graph.microsoft.com/v1.0/identityProtection/riskyUsers/dismiss
Content-Type: application/json
{
"userIds": [
"04487ee0-f4f6-4e7f-8999-facc5a30e232",
"13387ee0-f4f6-4e7f-8999-facc5120e345"
]
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var userIds = new List<String>()
{
"04487ee0-f4f6-4e7f-8999-facc5a30e232",
"13387ee0-f4f6-4e7f-8999-facc5120e345"
};
await graphClient.IdentityProtection.RiskyUsers
.Dismiss(userIds)
.Request()
.PostAsync();
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
const options = {
authProvider,
};
const client = Client.init(options);
const dismiss = {
userIds: [
'04487ee0-f4f6-4e7f-8999-facc5a30e232',
'13387ee0-f4f6-4e7f-8999-facc5120e345'
]
};
await client.api('/identityProtection/riskyUsers/dismiss')
.post(dismiss);
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/v1.0/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/identityProtection/riskyUsers/dismiss"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSMutableDictionary *payloadDictionary = [[NSMutableDictionary alloc] init];
NSMutableArray *userIdsList = [[NSMutableArray alloc] init];
[userIdsList addObject: @"04487ee0-f4f6-4e7f-8999-facc5a30e232"];
[userIdsList addObject: @"13387ee0-f4f6-4e7f-8999-facc5120e345"];
payloadDictionary[@"userIds"] = userIdsList;
NSData *data = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:kNilOptions error:&error];
[urlRequest setHTTPBody:data];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
LinkedList<String> userIdsList = new LinkedList<String>();
userIdsList.add("04487ee0-f4f6-4e7f-8999-facc5a30e232");
userIdsList.add("13387ee0-f4f6-4e7f-8999-facc5120e345");
graphClient.identityProtection().riskyUsers()
.dismiss(RiskyUserDismissParameterSet
.newBuilder()
.withUserIds(userIdsList)
.build())
.buildRequest()
.post();
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewUserIdsRequestBody()
requestBody.SetUserIds( []String {
"04487ee0-f4f6-4e7f-8999-facc5a30e232",
"13387ee0-f4f6-4e7f-8999-facc5120e345",
}
graphClient.IdentityProtection().RiskyUsers().Dismiss().Post(requestBody)
SDK をプロジェクトに追加し、authProvider インスタンスを作成する 方法の詳細については、SDK のドキュメントを参照してください 。
応答
HTTP/1.1 204 No Content