Class: MicrosoftGraph::Models::RiskyServicePrincipal

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

Direct Known Subclasses

RiskyServicePrincipalHistoryItem

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 riskyServicePrincipal and sets the default values.



59
60
61
# File 'lib/models/risky_service_principal.rb', line 59

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:

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

Returns:

  • a risky_service_principal

Raises:



67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/models/risky_service_principal.rb', line 67

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.riskyServicePrincipalHistoryItem"
                return RiskyServicePrincipalHistoryItem.new
        end
    end
    return RiskyServicePrincipal.new
end

Instance Method Details

#app_idObject

Gets the appId property value. The globally unique identifier for the associated application (its appId property), if any.

Returns:

  • a string



44
45
46
# File 'lib/models/risky_service_principal.rb', line 44

def app_id
    return @app_id
end

#app_id=(value) ⇒ Object

Sets the appId property value. The globally unique identifier for the associated application (its appId property), if any.

Parameters:

  • Value to set for the app_id property.

Returns:

  • a void



52
53
54
# File 'lib/models/risky_service_principal.rb', line 52

def app_id=(value)
    @app_id = value
end

#display_nameObject

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

Returns:

  • a string



83
84
85
# File 'lib/models/risky_service_principal.rb', line 83

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

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

Parameters:

  • Value to set for the display_name property.

Returns:

  • a void



91
92
93
# File 'lib/models/risky_service_principal.rb', line 91

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/models/risky_service_principal.rb', line 98

def get_field_deserializers()
    return super.merge({
        "appId" => lambda {|n| @app_id = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "history" => lambda {|n| @history = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::RiskyServicePrincipalHistoryItem.create_from_discriminator_value(pn) }) },
        "isEnabled" => lambda {|n| @is_enabled = n.get_boolean_value() },
        "isProcessing" => lambda {|n| @is_processing = n.get_boolean_value() },
        "riskDetail" => lambda {|n| @risk_detail = n.get_enum_value(MicrosoftGraph::Models::RiskDetail) },
        "riskLastUpdatedDateTime" => lambda {|n| @risk_last_updated_date_time = n.get_date_time_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) },
        "servicePrincipalType" => lambda {|n| @service_principal_type = n.get_string_value() },
    })
end

#historyObject

Gets the history property value. Represents the risk history of Azure AD service principals.

Returns:

  • a risky_service_principal_history_item



116
117
118
# File 'lib/models/risky_service_principal.rb', line 116

def history
    return @history
end

#history=(value) ⇒ Object

Sets the history property value. Represents the risk history of Azure AD service principals.

Parameters:

  • Value to set for the history property.

Returns:

  • a void



124
125
126
# File 'lib/models/risky_service_principal.rb', line 124

def history=(value)
    @history = value
end

#is_enabledObject

Gets the isEnabled property value. true if the service principal account is enabled; otherwise, false.

Returns:

  • a boolean



131
132
133
# File 'lib/models/risky_service_principal.rb', line 131

def is_enabled
    return @is_enabled
end

#is_enabled=(value) ⇒ Object

Sets the isEnabled property value. true if the service principal account is enabled; otherwise, false.

Parameters:

  • Value to set for the is_enabled property.

Returns:

  • a void



139
140
141
# File 'lib/models/risky_service_principal.rb', line 139

def is_enabled=(value)
    @is_enabled = value
end

#is_processingObject

Gets the isProcessing property value. Indicates whether Azure AD is currently processing the service principal’s risky state.

Returns:

  • a boolean



146
147
148
# File 'lib/models/risky_service_principal.rb', line 146

def is_processing
    return @is_processing
end

#is_processing=(value) ⇒ Object

Sets the isProcessing property value. Indicates whether Azure AD is currently processing the service principal’s risky state.

Parameters:

  • Value to set for the is_processing property.

Returns:

  • a void



154
155
156
# File 'lib/models/risky_service_principal.rb', line 154

def is_processing=(value)
    @is_processing = 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, unknownFutureValue, 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



161
162
163
# File 'lib/models/risky_service_principal.rb', line 161

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, unknownFutureValue, 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 to set for the risk_detail property.

Returns:

  • a void



169
170
171
# File 'lib/models/risky_service_principal.rb', line 169

def risk_detail=(value)
    @risk_detail = value
end

#risk_last_updated_date_timeObject

Gets the riskLastUpdatedDateTime property value. The date and time that the risk state 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, 2021 is 2021-01-01T00:00:00Z. Supports $filter (eq).

Returns:

  • a date_time



176
177
178
# File 'lib/models/risky_service_principal.rb', line 176

def risk_last_updated_date_time
    return @risk_last_updated_date_time
end

#risk_last_updated_date_time=(value) ⇒ Object

Sets the riskLastUpdatedDateTime property value. The date and time that the risk state 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, 2021 is 2021-01-01T00:00:00Z. Supports $filter (eq).

Parameters:

  • Value to set for the risk_last_updated_date_time property.

Returns:

  • a void



184
185
186
# File 'lib/models/risky_service_principal.rb', line 184

def risk_last_updated_date_time=(value)
    @risk_last_updated_date_time = value
end

#risk_levelObject

Gets the riskLevel property value. Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq).

Returns:

  • a risk_level



191
192
193
# File 'lib/models/risky_service_principal.rb', line 191

def risk_level
    return @risk_level
end

#risk_level=(value) ⇒ Object

Sets the riskLevel property value. Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq).

Parameters:

  • Value to set for the risk_level property.

Returns:

  • a void



199
200
201
# File 'lib/models/risky_service_principal.rb', line 199

def risk_level=(value)
    @risk_level = value
end

#risk_stateObject

Gets the riskState property value. State of the service principal’s risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.

Returns:

  • a risk_state



206
207
208
# File 'lib/models/risky_service_principal.rb', line 206

def risk_state
    return @risk_state
end

#risk_state=(value) ⇒ Object

Sets the riskState property value. State of the service principal’s risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue.

Parameters:

  • Value to set for the risk_state property.

Returns:

  • a void



214
215
216
# File 'lib/models/risky_service_principal.rb', line 214

def risk_state=(value)
    @risk_state = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • Serialization writer to use to serialize this model

Returns:

  • a void

Raises:



222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/models/risky_service_principal.rb', line 222

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("appId", @app_id)
    writer.write_string_value("displayName", @display_name)
    writer.write_collection_of_object_values("history", @history)
    writer.write_boolean_value("isEnabled", @is_enabled)
    writer.write_boolean_value("isProcessing", @is_processing)
    writer.write_enum_value("riskDetail", @risk_detail)
    writer.write_date_time_value("riskLastUpdatedDateTime", @risk_last_updated_date_time)
    writer.write_enum_value("riskLevel", @risk_level)
    writer.write_enum_value("riskState", @risk_state)
    writer.write_string_value("servicePrincipalType", @service_principal_type)
end

#service_principal_typeObject

Gets the servicePrincipalType property value. Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Azure AD internally and is inherited from servicePrincipal.

Returns:

  • a string



240
241
242
# File 'lib/models/risky_service_principal.rb', line 240

def service_principal_type
    return @service_principal_type
end

#service_principal_type=(value) ⇒ Object

Sets the servicePrincipalType property value. Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Azure AD internally and is inherited from servicePrincipal.

Parameters:

  • Value to set for the service_principal_type property.

Returns:

  • a void



248
249
250
# File 'lib/models/risky_service_principal.rb', line 248

def service_principal_type=(value)
    @service_principal_type = value
end