-
Notifications
You must be signed in to change notification settings - Fork 32
/
risk_detection.go
749 lines (747 loc) · 30.6 KB
/
risk_detection.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
type RiskDetection struct {
Entity
}
// NewRiskDetection instantiates a new RiskDetection and sets the default values.
func NewRiskDetection()(*RiskDetection) {
m := &RiskDetection{
Entity: *NewEntity(),
}
return m
}
// CreateRiskDetectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
// returns a Parsable when successful
func CreateRiskDetectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewRiskDetection(), nil
}
// GetActivity gets the activity property value. Indicates the activity type the detected risk is linked to. Possible values are: signin, user, unknownFutureValue.
// returns a *ActivityType when successful
func (m *RiskDetection) GetActivity()(*ActivityType) {
val, err := m.GetBackingStore().Get("activity")
if err != nil {
panic(err)
}
if val != nil {
return val.(*ActivityType)
}
return nil
}
// GetActivityDateTime gets the activityDateTime property value. Date and time that the risky activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is look like this: 2014-01-01T00:00:00Z
// returns a *Time when successful
func (m *RiskDetection) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("activityDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetAdditionalInfo gets the additionalInfo property value. Additional information associated with the risk detection in JSON format. For example, '[{/'Key/':/'userAgent/',/'Value/':/'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36/'}]'. Possible keys in the additionalInfo JSON string are: userAgent, alertUrl, relatedEventTimeInUtc, relatedUserAgent, deviceInformation, relatedLocation, requestId, correlationId, lastActivityTimeInUtc, malwareName, clientLocation, clientIp, riskReasons. For more information about riskReasons and possible values, see riskReasons values.
// returns a *string when successful
func (m *RiskDetection) GetAdditionalInfo()(*string) {
val, err := m.GetBackingStore().Get("additionalInfo")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetCorrelationId gets the correlationId property value. Correlation ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in.
// returns a *string when successful
func (m *RiskDetection) GetCorrelationId()(*string) {
val, err := m.GetBackingStore().Get("correlationId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetDetectedDateTime gets the detectedDateTime property value. Date and time that the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: 2014-01-01T00:00:00Z
// returns a *Time when successful
func (m *RiskDetection) GetDetectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("detectedDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetDetectionTimingType gets the detectionTimingType property value. Timing of the detected risk (real-time/offline). Possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue.
// returns a *RiskDetectionTimingType when successful
func (m *RiskDetection) GetDetectionTimingType()(*RiskDetectionTimingType) {
val, err := m.GetBackingStore().Get("detectionTimingType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*RiskDetectionTimingType)
}
return nil
}
// GetFieldDeserializers the deserialization information for the current model
// returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful
func (m *RiskDetection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := m.Entity.GetFieldDeserializers()
res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseActivityType)
if err != nil {
return err
}
if val != nil {
m.SetActivity(val.(*ActivityType))
}
return nil
}
res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetActivityDateTime(val)
}
return nil
}
res["additionalInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetAdditionalInfo(val)
}
return nil
}
res["correlationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetCorrelationId(val)
}
return nil
}
res["detectedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetDetectedDateTime(val)
}
return nil
}
res["detectionTimingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseRiskDetectionTimingType)
if err != nil {
return err
}
if val != nil {
m.SetDetectionTimingType(val.(*RiskDetectionTimingType))
}
return nil
}
res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetIpAddress(val)
}
return nil
}
res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetLastUpdatedDateTime(val)
}
return nil
}
res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(CreateSignInLocationFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetLocation(val.(SignInLocationable))
}
return nil
}
res["requestId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetRequestId(val)
}
return nil
}
res["riskDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseRiskDetail)
if err != nil {
return err
}
if val != nil {
m.SetRiskDetail(val.(*RiskDetail))
}
return nil
}
res["riskEventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetRiskEventType(val)
}
return nil
}
res["riskLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseRiskLevel)
if err != nil {
return err
}
if val != nil {
m.SetRiskLevel(val.(*RiskLevel))
}
return nil
}
res["riskState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseRiskState)
if err != nil {
return err
}
if val != nil {
m.SetRiskState(val.(*RiskState))
}
return nil
}
res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetSource(val)
}
return nil
}
res["tokenIssuerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetEnumValue(ParseTokenIssuerType)
if err != nil {
return err
}
if val != nil {
m.SetTokenIssuerType(val.(*TokenIssuerType))
}
return nil
}
res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetUserDisplayName(val)
}
return nil
}
res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetUserId(val)
}
return nil
}
res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetUserPrincipalName(val)
}
return nil
}
return res
}
// GetIpAddress gets the ipAddress property value. Provides the IP address of the client from where the risk occurred.
// returns a *string when successful
func (m *RiskDetection) GetIpAddress()(*string) {
val, err := m.GetBackingStore().Get("ipAddress")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Date and time that the risk detection was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is look like this: 2014-01-01T00:00:00Z
// returns a *Time when successful
func (m *RiskDetection) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
val, err := m.GetBackingStore().Get("lastUpdatedDateTime")
if err != nil {
panic(err)
}
if val != nil {
return val.(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
}
return nil
}
// GetLocation gets the location property value. Location of the sign-in.
// returns a SignInLocationable when successful
func (m *RiskDetection) GetLocation()(SignInLocationable) {
val, err := m.GetBackingStore().Get("location")
if err != nil {
panic(err)
}
if val != nil {
return val.(SignInLocationable)
}
return nil
}
// GetRequestId gets the requestId property value. Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in.
// returns a *string when successful
func (m *RiskDetection) GetRequestId()(*string) {
val, err := m.GetBackingStore().Get("requestId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetRiskDetail gets the riskDetail property value. Details of the detected risk. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, m365DAdminDismissedDetection. Note that you must use the Prefer: include - unknown -enum-members request header to get the following value(s) in this evolvable enum: m365DAdminDismissedDetection.
// returns a *RiskDetail when successful
func (m *RiskDetection) GetRiskDetail()(*RiskDetail) {
val, err := m.GetBackingStore().Get("riskDetail")
if err != nil {
panic(err)
}
if val != nil {
return val.(*RiskDetail)
}
return nil
}
// GetRiskEventType gets the riskEventType property value. The type of risk event detected. The possible values are adminConfirmedUserCompromised, anomalousToken, anomalousUserActivity, anonymizedIPAddress, generic, impossibleTravel, investigationsThreatIntelligence, suspiciousSendingPatterns, leakedCredentials, maliciousIPAddress,malwareInfectedIPAddress, mcasSuspiciousInboxManipulationRules, newCountry, passwordSpray,riskyIPAddress, suspiciousAPITraffic, suspiciousBrowser,suspiciousInboxForwarding, suspiciousIPAddress, tokenIssuerAnomaly, unfamiliarFeatures, unlikelyTravel. If the risk detection is a premium detection, will show generic. For more information about each value, see Risk types and detection.
// returns a *string when successful
func (m *RiskDetection) GetRiskEventType()(*string) {
val, err := m.GetBackingStore().Get("riskEventType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetRiskLevel gets the riskLevel property value. Level of the detected risk. Possible values are: low, medium, high, hidden, none, unknownFutureValue.
// returns a *RiskLevel when successful
func (m *RiskDetection) GetRiskLevel()(*RiskLevel) {
val, err := m.GetBackingStore().Get("riskLevel")
if err != nil {
panic(err)
}
if val != nil {
return val.(*RiskLevel)
}
return nil
}
// GetRiskState gets the riskState property value. The state of a detected risky user or sign-in. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.
// returns a *RiskState when successful
func (m *RiskDetection) GetRiskState()(*RiskState) {
val, err := m.GetBackingStore().Get("riskState")
if err != nil {
panic(err)
}
if val != nil {
return val.(*RiskState)
}
return nil
}
// GetSource gets the source property value. Source of the risk detection. For example, activeDirectory.
// returns a *string when successful
func (m *RiskDetection) GetSource()(*string) {
val, err := m.GetBackingStore().Get("source")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetTokenIssuerType gets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. Possible values are: AzureAD, ADFederationServices, UnknownFutureValue.
// returns a *TokenIssuerType when successful
func (m *RiskDetection) GetTokenIssuerType()(*TokenIssuerType) {
val, err := m.GetBackingStore().Get("tokenIssuerType")
if err != nil {
panic(err)
}
if val != nil {
return val.(*TokenIssuerType)
}
return nil
}
// GetUserDisplayName gets the userDisplayName property value. The user principal name (UPN) of the user.
// returns a *string when successful
func (m *RiskDetection) GetUserDisplayName()(*string) {
val, err := m.GetBackingStore().Get("userDisplayName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetUserId gets the userId property value. Unique ID of the user.
// returns a *string when successful
func (m *RiskDetection) GetUserId()(*string) {
val, err := m.GetBackingStore().Get("userId")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// GetUserPrincipalName gets the userPrincipalName property value. The user principal name (UPN) of the user.
// returns a *string when successful
func (m *RiskDetection) GetUserPrincipalName()(*string) {
val, err := m.GetBackingStore().Get("userPrincipalName")
if err != nil {
panic(err)
}
if val != nil {
return val.(*string)
}
return nil
}
// Serialize serializes information the current object
func (m *RiskDetection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
err := m.Entity.Serialize(writer)
if err != nil {
return err
}
if m.GetActivity() != nil {
cast := (*m.GetActivity()).String()
err = writer.WriteStringValue("activity", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("additionalInfo", m.GetAdditionalInfo())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("correlationId", m.GetCorrelationId())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("detectedDateTime", m.GetDetectedDateTime())
if err != nil {
return err
}
}
if m.GetDetectionTimingType() != nil {
cast := (*m.GetDetectionTimingType()).String()
err = writer.WriteStringValue("detectionTimingType", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("ipAddress", m.GetIpAddress())
if err != nil {
return err
}
}
{
err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime())
if err != nil {
return err
}
}
{
err = writer.WriteObjectValue("location", m.GetLocation())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("requestId", m.GetRequestId())
if err != nil {
return err
}
}
if m.GetRiskDetail() != nil {
cast := (*m.GetRiskDetail()).String()
err = writer.WriteStringValue("riskDetail", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("riskEventType", m.GetRiskEventType())
if err != nil {
return err
}
}
if m.GetRiskLevel() != nil {
cast := (*m.GetRiskLevel()).String()
err = writer.WriteStringValue("riskLevel", &cast)
if err != nil {
return err
}
}
if m.GetRiskState() != nil {
cast := (*m.GetRiskState()).String()
err = writer.WriteStringValue("riskState", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("source", m.GetSource())
if err != nil {
return err
}
}
if m.GetTokenIssuerType() != nil {
cast := (*m.GetTokenIssuerType()).String()
err = writer.WriteStringValue("tokenIssuerType", &cast)
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("userId", m.GetUserId())
if err != nil {
return err
}
}
{
err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName())
if err != nil {
return err
}
}
return nil
}
// SetActivity sets the activity property value. Indicates the activity type the detected risk is linked to. Possible values are: signin, user, unknownFutureValue.
func (m *RiskDetection) SetActivity(value *ActivityType)() {
err := m.GetBackingStore().Set("activity", value)
if err != nil {
panic(err)
}
}
// SetActivityDateTime sets the activityDateTime property value. Date and time that the risky activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is look like this: 2014-01-01T00:00:00Z
func (m *RiskDetection) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("activityDateTime", value)
if err != nil {
panic(err)
}
}
// SetAdditionalInfo sets the additionalInfo property value. Additional information associated with the risk detection in JSON format. For example, '[{/'Key/':/'userAgent/',/'Value/':/'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36/'}]'. Possible keys in the additionalInfo JSON string are: userAgent, alertUrl, relatedEventTimeInUtc, relatedUserAgent, deviceInformation, relatedLocation, requestId, correlationId, lastActivityTimeInUtc, malwareName, clientLocation, clientIp, riskReasons. For more information about riskReasons and possible values, see riskReasons values.
func (m *RiskDetection) SetAdditionalInfo(value *string)() {
err := m.GetBackingStore().Set("additionalInfo", value)
if err != nil {
panic(err)
}
}
// SetCorrelationId sets the correlationId property value. Correlation ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in.
func (m *RiskDetection) SetCorrelationId(value *string)() {
err := m.GetBackingStore().Set("correlationId", value)
if err != nil {
panic(err)
}
}
// SetDetectedDateTime sets the detectedDateTime property value. Date and time that the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: 2014-01-01T00:00:00Z
func (m *RiskDetection) SetDetectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("detectedDateTime", value)
if err != nil {
panic(err)
}
}
// SetDetectionTimingType sets the detectionTimingType property value. Timing of the detected risk (real-time/offline). Possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue.
func (m *RiskDetection) SetDetectionTimingType(value *RiskDetectionTimingType)() {
err := m.GetBackingStore().Set("detectionTimingType", value)
if err != nil {
panic(err)
}
}
// SetIpAddress sets the ipAddress property value. Provides the IP address of the client from where the risk occurred.
func (m *RiskDetection) SetIpAddress(value *string)() {
err := m.GetBackingStore().Set("ipAddress", value)
if err != nil {
panic(err)
}
}
// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Date and time that the risk detection was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is look like this: 2014-01-01T00:00:00Z
func (m *RiskDetection) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
err := m.GetBackingStore().Set("lastUpdatedDateTime", value)
if err != nil {
panic(err)
}
}
// SetLocation sets the location property value. Location of the sign-in.
func (m *RiskDetection) SetLocation(value SignInLocationable)() {
err := m.GetBackingStore().Set("location", value)
if err != nil {
panic(err)
}
}
// SetRequestId sets the requestId property value. Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in.
func (m *RiskDetection) SetRequestId(value *string)() {
err := m.GetBackingStore().Set("requestId", value)
if err != nil {
panic(err)
}
}
// SetRiskDetail sets the riskDetail property value. Details of the detected risk. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, m365DAdminDismissedDetection. Note that you must use the Prefer: include - unknown -enum-members request header to get the following value(s) in this evolvable enum: m365DAdminDismissedDetection.
func (m *RiskDetection) SetRiskDetail(value *RiskDetail)() {
err := m.GetBackingStore().Set("riskDetail", value)
if err != nil {
panic(err)
}
}
// SetRiskEventType sets the riskEventType property value. The type of risk event detected. The possible values are adminConfirmedUserCompromised, anomalousToken, anomalousUserActivity, anonymizedIPAddress, generic, impossibleTravel, investigationsThreatIntelligence, suspiciousSendingPatterns, leakedCredentials, maliciousIPAddress,malwareInfectedIPAddress, mcasSuspiciousInboxManipulationRules, newCountry, passwordSpray,riskyIPAddress, suspiciousAPITraffic, suspiciousBrowser,suspiciousInboxForwarding, suspiciousIPAddress, tokenIssuerAnomaly, unfamiliarFeatures, unlikelyTravel. If the risk detection is a premium detection, will show generic. For more information about each value, see Risk types and detection.
func (m *RiskDetection) SetRiskEventType(value *string)() {
err := m.GetBackingStore().Set("riskEventType", value)
if err != nil {
panic(err)
}
}
// SetRiskLevel sets the riskLevel property value. Level of the detected risk. Possible values are: low, medium, high, hidden, none, unknownFutureValue.
func (m *RiskDetection) SetRiskLevel(value *RiskLevel)() {
err := m.GetBackingStore().Set("riskLevel", value)
if err != nil {
panic(err)
}
}
// SetRiskState sets the riskState property value. The state of a detected risky user or sign-in. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.
func (m *RiskDetection) SetRiskState(value *RiskState)() {
err := m.GetBackingStore().Set("riskState", value)
if err != nil {
panic(err)
}
}
// SetSource sets the source property value. Source of the risk detection. For example, activeDirectory.
func (m *RiskDetection) SetSource(value *string)() {
err := m.GetBackingStore().Set("source", value)
if err != nil {
panic(err)
}
}
// SetTokenIssuerType sets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. Possible values are: AzureAD, ADFederationServices, UnknownFutureValue.
func (m *RiskDetection) SetTokenIssuerType(value *TokenIssuerType)() {
err := m.GetBackingStore().Set("tokenIssuerType", value)
if err != nil {
panic(err)
}
}
// SetUserDisplayName sets the userDisplayName property value. The user principal name (UPN) of the user.
func (m *RiskDetection) SetUserDisplayName(value *string)() {
err := m.GetBackingStore().Set("userDisplayName", value)
if err != nil {
panic(err)
}
}
// SetUserId sets the userId property value. Unique ID of the user.
func (m *RiskDetection) SetUserId(value *string)() {
err := m.GetBackingStore().Set("userId", value)
if err != nil {
panic(err)
}
}
// SetUserPrincipalName sets the userPrincipalName property value. The user principal name (UPN) of the user.
func (m *RiskDetection) SetUserPrincipalName(value *string)() {
err := m.GetBackingStore().Set("userPrincipalName", value)
if err != nil {
panic(err)
}
}
type RiskDetectionable interface {
Entityable
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetActivity()(*ActivityType)
GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetAdditionalInfo()(*string)
GetCorrelationId()(*string)
GetDetectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetDetectionTimingType()(*RiskDetectionTimingType)
GetIpAddress()(*string)
GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetLocation()(SignInLocationable)
GetRequestId()(*string)
GetRiskDetail()(*RiskDetail)
GetRiskEventType()(*string)
GetRiskLevel()(*RiskLevel)
GetRiskState()(*RiskState)
GetSource()(*string)
GetTokenIssuerType()(*TokenIssuerType)
GetUserDisplayName()(*string)
GetUserId()(*string)
GetUserPrincipalName()(*string)
SetActivity(value *ActivityType)()
SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetAdditionalInfo(value *string)()
SetCorrelationId(value *string)()
SetDetectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetDetectionTimingType(value *RiskDetectionTimingType)()
SetIpAddress(value *string)()
SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetLocation(value SignInLocationable)()
SetRequestId(value *string)()
SetRiskDetail(value *RiskDetail)()
SetRiskEventType(value *string)()
SetRiskLevel(value *RiskLevel)()
SetRiskState(value *RiskState)()
SetSource(value *string)()
SetTokenIssuerType(value *TokenIssuerType)()
SetUserDisplayName(value *string)()
SetUserId(value *string)()
SetUserPrincipalName(value *string)()
}