Class: MicrosoftGraph::Models::ServicePrincipalRiskDetection

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/service_principal_risk_detection.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new servicePrincipalRiskDetection and sets the default values.



134
135
136
# File 'lib/models/service_principal_risk_detection.rb', line 134

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a service_principal_risk_detection

Raises:

  • (StandardError)


157
158
159
160
# File 'lib/models/service_principal_risk_detection.rb', line 157

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return ServicePrincipalRiskDetection.new
end

Instance Method Details

#activityObject

Gets the activity property value. Indicates the activity type the detected risk is linked to. The possible values are: signin, servicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: servicePrincipal.

Returns:

  • a activity_type



74
75
76
# File 'lib/models/service_principal_risk_detection.rb', line 74

def activity
    return @activity
end

#activity=(value) ⇒ Object

Sets the activity property value. Indicates the activity type the detected risk is linked to. The possible values are: signin, servicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: servicePrincipal.

Parameters:

  • value

    Value to set for the activity property.

Returns:

  • a void



82
83
84
# File 'lib/models/service_principal_risk_detection.rb', line 82

def activity=(value)
    @activity = value
end

#activity_date_timeObject

Gets the activityDateTime property value. Date and time when 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 2014-01-01T00:00:00Z

Returns:

  • a date_time



89
90
91
# File 'lib/models/service_principal_risk_detection.rb', line 89

def activity_date_time
    return @activity_date_time
end

#activity_date_time=(value) ⇒ Object

Sets the activityDateTime property value. Date and time when 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 2014-01-01T00:00:00Z

Parameters:

  • value

    Value to set for the activityDateTime property.

Returns:

  • a void



97
98
99
# File 'lib/models/service_principal_risk_detection.rb', line 97

def activity_date_time=(value)
    @activity_date_time = value
end

#additional_infoObject

Gets the additionalInfo property value. Additional information associated with the risk detection. This string value is represented as a JSON object with the quotations escaped.

Returns:

  • a string



104
105
106
# File 'lib/models/service_principal_risk_detection.rb', line 104

def additional_info
    return @additional_info
end

#additional_info=(value) ⇒ Object

Sets the additionalInfo property value. Additional information associated with the risk detection. This string value is represented as a JSON object with the quotations escaped.

Parameters:

  • value

    Value to set for the additionalInfo property.

Returns:

  • a void



112
113
114
# File 'lib/models/service_principal_risk_detection.rb', line 112

def additional_info=(value)
    @additional_info = value
end

#app_idObject

Gets the appId property value. The unique identifier for the associated application.

Returns:

  • a string



119
120
121
# File 'lib/models/service_principal_risk_detection.rb', line 119

def app_id
    return @app_id
end

#app_id=(value) ⇒ Object

Sets the appId property value. The unique identifier for the associated application.

Parameters:

  • value

    Value to set for the appId property.

Returns:

  • a void



127
128
129
# File 'lib/models/service_principal_risk_detection.rb', line 127

def app_id=(value)
    @app_id = value
end

#correlation_idObject

Gets the correlationId property value. Correlation ID of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity.

Returns:

  • a string



141
142
143
# File 'lib/models/service_principal_risk_detection.rb', line 141

def correlation_id
    return @correlation_id
end

#correlation_id=(value) ⇒ Object

Sets the correlationId property value. Correlation ID of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity.

Parameters:

  • value

    Value to set for the correlationId property.

Returns:

  • a void



149
150
151
# File 'lib/models/service_principal_risk_detection.rb', line 149

def correlation_id=(value)
    @correlation_id = value
end

#detected_date_timeObject

Gets the detectedDateTime property value. Date and time when 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 is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



165
166
167
# File 'lib/models/service_principal_risk_detection.rb', line 165

def detected_date_time
    return @detected_date_time
end

#detected_date_time=(value) ⇒ Object

Sets the detectedDateTime property value. Date and time when 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 is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the detectedDateTime property.

Returns:

  • a void



173
174
175
# File 'lib/models/service_principal_risk_detection.rb', line 173

def detected_date_time=(value)
    @detected_date_time = value
end

#detection_timing_typeObject

Gets the detectionTimingType property value. Timing of the detected risk , whether real-time or offline. The possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue.

Returns:

  • a risk_detection_timing_type



180
181
182
# File 'lib/models/service_principal_risk_detection.rb', line 180

def detection_timing_type
    return @detection_timing_type
end

#detection_timing_type=(value) ⇒ Object

Sets the detectionTimingType property value. Timing of the detected risk , whether real-time or offline. The possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue.

Parameters:

  • value

    Value to set for the detectionTimingType property.

Returns:

  • a void



188
189
190
# File 'lib/models/service_principal_risk_detection.rb', line 188

def detection_timing_type=(value)
    @detection_timing_type = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/models/service_principal_risk_detection.rb', line 195

def get_field_deserializers()
    return super.merge({
        "activity" => lambda {|n| @activity = n.get_enum_value(MicrosoftGraph::Models::ActivityType) },
        "activityDateTime" => lambda {|n| @activity_date_time = n.get_date_time_value() },
        "additionalInfo" => lambda {|n| @additional_info = n.get_string_value() },
        "appId" => lambda {|n| @app_id = n.get_string_value() },
        "correlationId" => lambda {|n| @correlation_id = n.get_string_value() },
        "detectedDateTime" => lambda {|n| @detected_date_time = n.get_date_time_value() },
        "detectionTimingType" => lambda {|n| @detection_timing_type = n.get_enum_value(MicrosoftGraph::Models::RiskDetectionTimingType) },
        "ipAddress" => lambda {|n| @ip_address = n.get_string_value() },
        "keyIds" => lambda {|n| @key_ids = n.get_collection_of_primitive_values(String) },
        "lastUpdatedDateTime" => lambda {|n| @last_updated_date_time = n.get_date_time_value() },
        "location" => lambda {|n| @location = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SignInLocation.create_from_discriminator_value(pn) }) },
        "requestId" => lambda {|n| @request_id = n.get_string_value() },
        "riskDetail" => lambda {|n| @risk_detail = n.get_enum_value(MicrosoftGraph::Models::RiskDetail) },
        "riskEventType" => lambda {|n| @risk_event_type = n.get_string_value() },
        "riskLevel" => lambda {|n| @risk_level = n.get_enum_value(MicrosoftGraph::Models::RiskLevel) },
        "riskState" => lambda {|n| @risk_state = n.get_enum_value(MicrosoftGraph::Models::RiskState) },
        "servicePrincipalDisplayName" => lambda {|n| @service_principal_display_name = n.get_string_value() },
        "servicePrincipalId" => lambda {|n| @service_principal_id = n.get_string_value() },
        "source" => lambda {|n| @source = n.get_string_value() },
        "tokenIssuerType" => lambda {|n| @token_issuer_type = n.get_enum_value(MicrosoftGraph::Models::TokenIssuerType) },
    })
end

#ip_addressObject

Gets the ipAddress property value. Provides the IP address of the client from where the risk occurred.

Returns:

  • a string



223
224
225
# File 'lib/models/service_principal_risk_detection.rb', line 223

def ip_address
    return @ip_address
end

#ip_address=(value) ⇒ Object

Sets the ipAddress property value. Provides the IP address of the client from where the risk occurred.

Parameters:

  • value

    Value to set for the ipAddress property.

Returns:

  • a void



231
232
233
# File 'lib/models/service_principal_risk_detection.rb', line 231

def ip_address=(value)
    @ip_address = value
end

#key_idsObject

Gets the keyIds property value. The unique identifier for the key credential associated with the risk detection.

Returns:

  • a string



238
239
240
# File 'lib/models/service_principal_risk_detection.rb', line 238

def key_ids
    return @key_ids
end

#key_ids=(value) ⇒ Object

Sets the keyIds property value. The unique identifier for the key credential associated with the risk detection.

Parameters:

  • value

    Value to set for the keyIds property.

Returns:

  • a void



246
247
248
# File 'lib/models/service_principal_risk_detection.rb', line 246

def key_ids=(value)
    @key_ids = value
end

#last_updated_date_timeObject

Gets the lastUpdatedDateTime property value. Date and time when the risk detection was last updated.

Returns:

  • a date_time



253
254
255
# File 'lib/models/service_principal_risk_detection.rb', line 253

def last_updated_date_time
    return @last_updated_date_time
end

#last_updated_date_time=(value) ⇒ Object

Sets the lastUpdatedDateTime property value. Date and time when the risk detection was last updated.

Parameters:

  • value

    Value to set for the lastUpdatedDateTime property.

Returns:

  • a void



261
262
263
# File 'lib/models/service_principal_risk_detection.rb', line 261

def last_updated_date_time=(value)
    @last_updated_date_time = value
end

#locationObject

Gets the location property value. Location from where the sign-in was initiated.

Returns:

  • a sign_in_location



268
269
270
# File 'lib/models/service_principal_risk_detection.rb', line 268

def location
    return @location
end

#location=(value) ⇒ Object

Sets the location property value. Location from where the sign-in was initiated.

Parameters:

  • value

    Value to set for the location property.

Returns:

  • a void



276
277
278
# File 'lib/models/service_principal_risk_detection.rb', line 276

def location=(value)
    @location = value
end

#request_idObject

Gets the requestId property value. Request identifier of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. Supports $filter (eq).

Returns:

  • a string



283
284
285
# File 'lib/models/service_principal_risk_detection.rb', line 283

def request_id
    return @request_id
end

#request_id=(value) ⇒ Object

Sets the requestId property value. Request identifier of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. Supports $filter (eq).

Parameters:

  • value

    Value to set for the requestId property.

Returns:

  • a void



291
292
293
# File 'lib/models/service_principal_risk_detection.rb', line 291

def request_id=(value)
    @request_id = value
end

#risk_detailObject

Gets the riskDetail property value. Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: none, hidden, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal.

Returns:

  • a risk_detail



298
299
300
# File 'lib/models/service_principal_risk_detection.rb', line 298

def risk_detail
    return @risk_detail
end

#risk_detail=(value) ⇒ Object

Sets the riskDetail property value. Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: none, hidden, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal.

Parameters:

  • value

    Value to set for the riskDetail property.

Returns:

  • a void



306
307
308
# File 'lib/models/service_principal_risk_detection.rb', line 306

def risk_detail=(value)
    @risk_detail = value
end

#risk_event_typeObject

Gets the riskEventType property value. The type of risk event detected. The possible values are: investigationsThreatIntelligence, generic, adminConfirmedServicePrincipalCompromised, suspiciousSignins, leakedCredentials, anomalousServicePrincipalActivity, maliciousApplication, suspiciousApplication.

Returns:

  • a string



313
314
315
# File 'lib/models/service_principal_risk_detection.rb', line 313

def risk_event_type
    return @risk_event_type
end

#risk_event_type=(value) ⇒ Object

Sets the riskEventType property value. The type of risk event detected. The possible values are: investigationsThreatIntelligence, generic, adminConfirmedServicePrincipalCompromised, suspiciousSignins, leakedCredentials, anomalousServicePrincipalActivity, maliciousApplication, suspiciousApplication.

Parameters:

  • value

    Value to set for the riskEventType property.

Returns:

  • a void



321
322
323
# File 'lib/models/service_principal_risk_detection.rb', line 321

def risk_event_type=(value)
    @risk_event_type = value
end

#risk_levelObject

Gets the riskLevel property value. Level of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: low, medium, high, hidden, none.

Returns:

  • a risk_level



328
329
330
# File 'lib/models/service_principal_risk_detection.rb', line 328

def risk_level
    return @risk_level
end

#risk_level=(value) ⇒ Object

Sets the riskLevel property value. Level of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: low, medium, high, hidden, none.

Parameters:

  • value

    Value to set for the riskLevel property.

Returns:

  • a void



336
337
338
# File 'lib/models/service_principal_risk_detection.rb', line 336

def risk_level=(value)
    @risk_level = value
end

#risk_stateObject

Gets the riskState property value. The state of a detected risky service principal or sign-in activity. The possible values are: none, dismissed, atRisk, confirmedCompromised.

Returns:

  • a risk_state



343
344
345
# File 'lib/models/service_principal_risk_detection.rb', line 343

def risk_state
    return @risk_state
end

#risk_state=(value) ⇒ Object

Sets the riskState property value. The state of a detected risky service principal or sign-in activity. The possible values are: none, dismissed, atRisk, confirmedCompromised.

Parameters:

  • value

    Value to set for the riskState property.

Returns:

  • a void



351
352
353
# File 'lib/models/service_principal_risk_detection.rb', line 351

def risk_state=(value)
    @risk_state = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# File 'lib/models/service_principal_risk_detection.rb', line 359

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("activity", @activity)
    writer.write_date_time_value("activityDateTime", @activity_date_time)
    writer.write_string_value("additionalInfo", @additional_info)
    writer.write_string_value("appId", @app_id)
    writer.write_string_value("correlationId", @correlation_id)
    writer.write_date_time_value("detectedDateTime", @detected_date_time)
    writer.write_enum_value("detectionTimingType", @detection_timing_type)
    writer.write_string_value("ipAddress", @ip_address)
    writer.write_collection_of_primitive_values("keyIds", @key_ids)
    writer.write_date_time_value("lastUpdatedDateTime", @last_updated_date_time)
    writer.write_object_value("location", @location)
    writer.write_string_value("requestId", @request_id)
    writer.write_enum_value("riskDetail", @risk_detail)
    writer.write_string_value("riskEventType", @risk_event_type)
    writer.write_enum_value("riskLevel", @risk_level)
    writer.write_enum_value("riskState", @risk_state)
    writer.write_string_value("servicePrincipalDisplayName", @service_principal_display_name)
    writer.write_string_value("servicePrincipalId", @service_principal_id)
    writer.write_string_value("source", @source)
    writer.write_enum_value("tokenIssuerType", @token_issuer_type)
end

#service_principal_display_nameObject

Gets the servicePrincipalDisplayName property value. The display name for the service principal.

Returns:

  • a string



387
388
389
# File 'lib/models/service_principal_risk_detection.rb', line 387

def service_principal_display_name
    return @service_principal_display_name
end

#service_principal_display_name=(value) ⇒ Object

Sets the servicePrincipalDisplayName property value. The display name for the service principal.

Parameters:

  • value

    Value to set for the servicePrincipalDisplayName property.

Returns:

  • a void



395
396
397
# File 'lib/models/service_principal_risk_detection.rb', line 395

def service_principal_display_name=(value)
    @service_principal_display_name = value
end

#service_principal_idObject

Gets the servicePrincipalId property value. The unique identifier for the service principal. Supports $filter (eq).

Returns:

  • a string



402
403
404
# File 'lib/models/service_principal_risk_detection.rb', line 402

def service_principal_id
    return @service_principal_id
end

#service_principal_id=(value) ⇒ Object

Sets the servicePrincipalId property value. The unique identifier for the service principal. Supports $filter (eq).

Parameters:

  • value

    Value to set for the servicePrincipalId property.

Returns:

  • a void



410
411
412
# File 'lib/models/service_principal_risk_detection.rb', line 410

def service_principal_id=(value)
    @service_principal_id = value
end

#sourceObject

Gets the source property value. Source of the risk detection. For example, identityProtection.

Returns:

  • a string



417
418
419
# File 'lib/models/service_principal_risk_detection.rb', line 417

def source
    return @source
end

#source=(value) ⇒ Object

Sets the source property value. Source of the risk detection. For example, identityProtection.

Parameters:

  • value

    Value to set for the source property.

Returns:

  • a void



425
426
427
# File 'lib/models/service_principal_risk_detection.rb', line 425

def source=(value)
    @source = value
end

#token_issuer_typeObject

Gets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. The possible values are: AzureAD.

Returns:

  • a token_issuer_type



432
433
434
# File 'lib/models/service_principal_risk_detection.rb', line 432

def token_issuer_type
    return @token_issuer_type
end

#token_issuer_type=(value) ⇒ Object

Sets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. The possible values are: AzureAD.

Parameters:

  • value

    Value to set for the tokenIssuerType property.

Returns:

  • a void



440
441
442
# File 'lib/models/service_principal_risk_detection.rb', line 440

def token_issuer_type=(value)
    @token_issuer_type = value
end