Class: MicrosoftGraph::Models::AuthorizationPolicy

Inherits:
PolicyBase show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/authorization_policy.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PolicyBase

#description, #description=, #display_name, #display_name=

Methods inherited from DirectoryObject

#deleted_date_time, #deleted_date_time=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new authorizationPolicy and sets the default values.



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

def initialize()
    super
    @odata_type = "#microsoft.graph.authorizationPolicy"
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 authorization_policy

Raises:

  • (StandardError)


136
137
138
139
# File 'lib/models/authorization_policy.rb', line 136

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

Instance Method Details

#allow_email_verified_users_to_join_organizationObject

Gets the allowEmailVerifiedUsersToJoinOrganization property value. Indicates whether a user can join the tenant by email validation.

Returns:

  • a boolean



37
38
39
# File 'lib/models/authorization_policy.rb', line 37

def allow_email_verified_users_to_join_organization
    return @allow_email_verified_users_to_join_organization
end

#allow_email_verified_users_to_join_organization=(value) ⇒ Object

Sets the allowEmailVerifiedUsersToJoinOrganization property value. Indicates whether a user can join the tenant by email validation.

Parameters:

  • value

    Value to set for the allowEmailVerifiedUsersToJoinOrganization property.

Returns:

  • a void



45
46
47
# File 'lib/models/authorization_policy.rb', line 45

def allow_email_verified_users_to_join_organization=(value)
    @allow_email_verified_users_to_join_organization = value
end

#allow_invites_fromObject

Gets the allowInvitesFrom property value. Indicates who can invite external users to the organization. Possible values are: none, adminsAndGuestInviters, adminsGuestInvitersAndAllMembers, everyone. everyone is the default setting for all cloud environments except US Government. For more details, see allowInvitesFrom values.

Returns:

  • a allow_invites_from



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

def allow_invites_from
    return @allow_invites_from
end

#allow_invites_from=(value) ⇒ Object

Sets the allowInvitesFrom property value. Indicates who can invite external users to the organization. Possible values are: none, adminsAndGuestInviters, adminsGuestInvitersAndAllMembers, everyone. everyone is the default setting for all cloud environments except US Government. For more details, see allowInvitesFrom values.

Parameters:

  • value

    Value to set for the allowInvitesFrom property.

Returns:

  • a void



60
61
62
# File 'lib/models/authorization_policy.rb', line 60

def allow_invites_from=(value)
    @allow_invites_from = value
end

Gets the allowUserConsentForRiskyApps property value. Indicates whether user consent for risky apps is allowed. We recommend to keep this as false. Default value is false.

Returns:

  • a boolean



67
68
69
# File 'lib/models/authorization_policy.rb', line 67

def allow_user_consent_for_risky_apps
    return @allow_user_consent_for_risky_apps
end

Sets the allowUserConsentForRiskyApps property value. Indicates whether user consent for risky apps is allowed. We recommend to keep this as false. Default value is false.

Parameters:

  • value

    Value to set for the allowUserConsentForRiskyApps property.

Returns:

  • a void



75
76
77
# File 'lib/models/authorization_policy.rb', line 75

def allow_user_consent_for_risky_apps=(value)
    @allow_user_consent_for_risky_apps = value
end

#allowed_to_sign_up_email_based_subscriptionsObject

Gets the allowedToSignUpEmailBasedSubscriptions property value. Indicates whether users can sign up for email based subscriptions.

Returns:

  • a boolean



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

def 
    return 
end

#allowed_to_sign_up_email_based_subscriptions=(value) ⇒ Object

Sets the allowedToSignUpEmailBasedSubscriptions property value. Indicates whether users can sign up for email based subscriptions.

Parameters:

  • value

    Value to set for the allowedToSignUpEmailBasedSubscriptions property.

Returns:

  • a void



90
91
92
# File 'lib/models/authorization_policy.rb', line 90

def (value)
     = value
end

#allowed_to_use_s_s_p_rObject

Gets the allowedToUseSSPR property value. Indicates whether users can use the Self-Serve Password Reset feature on the tenant.

Returns:

  • a boolean



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

def allowed_to_use_s_s_p_r
    return @allowed_to_use_s_s_p_r
end

#allowed_to_use_s_s_p_r=(value) ⇒ Object

Sets the allowedToUseSSPR property value. Indicates whether users can use the Self-Serve Password Reset feature on the tenant.

Parameters:

  • value

    Value to set for the allowedToUseSSPR property.

Returns:

  • a void



105
106
107
# File 'lib/models/authorization_policy.rb', line 105

def allowed_to_use_s_s_p_r=(value)
    @allowed_to_use_s_s_p_r = value
end

#block_msol_power_shellObject

Gets the blockMsolPowerShell property value. To disable the use of MSOL PowerShell, set this property to true. This also disables user-based access to the legacy service endpoint used by MSOL PowerShell. This does not affect Azure Active Directory Connect or Microsoft Graph.

Returns:

  • a boolean



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

def block_msol_power_shell
    return @block_msol_power_shell
end

#block_msol_power_shell=(value) ⇒ Object

Sets the blockMsolPowerShell property value. To disable the use of MSOL PowerShell, set this property to true. This also disables user-based access to the legacy service endpoint used by MSOL PowerShell. This does not affect Azure Active Directory Connect or Microsoft Graph.

Parameters:

  • value

    Value to set for the blockMsolPowerShell property.

Returns:

  • a void



120
121
122
# File 'lib/models/authorization_policy.rb', line 120

def block_msol_power_shell=(value)
    @block_msol_power_shell = value
end

#default_user_role_permissionsObject

Gets the defaultUserRolePermissions property value. The defaultUserRolePermissions property

Returns:

  • a default_user_role_permissions



144
145
146
# File 'lib/models/authorization_policy.rb', line 144

def default_user_role_permissions
    return @default_user_role_permissions
end

#default_user_role_permissions=(value) ⇒ Object

Sets the defaultUserRolePermissions property value. The defaultUserRolePermissions property

Parameters:

  • value

    Value to set for the defaultUserRolePermissions property.

Returns:

  • a void



152
153
154
# File 'lib/models/authorization_policy.rb', line 152

def default_user_role_permissions=(value)
    @default_user_role_permissions = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/models/authorization_policy.rb', line 159

def get_field_deserializers()
    return super.merge({
        "allowEmailVerifiedUsersToJoinOrganization" => lambda {|n| @allow_email_verified_users_to_join_organization = n.get_boolean_value() },
        "allowInvitesFrom" => lambda {|n| @allow_invites_from = n.get_enum_value(MicrosoftGraph::Models::AllowInvitesFrom) },
        "allowUserConsentForRiskyApps" => lambda {|n| @allow_user_consent_for_risky_apps = n.get_boolean_value() },
        "allowedToSignUpEmailBasedSubscriptions" => lambda {|n|  = n.get_boolean_value() },
        "allowedToUseSSPR" => lambda {|n| @allowed_to_use_s_s_p_r = n.get_boolean_value() },
        "blockMsolPowerShell" => lambda {|n| @block_msol_power_shell = n.get_boolean_value() },
        "defaultUserRolePermissions" => lambda {|n| @default_user_role_permissions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::DefaultUserRolePermissions.create_from_discriminator_value(pn) }) },
        "guestUserRoleId" => lambda {|n| @guest_user_role_id = n.get_guid_value() },
    })
end

#guest_user_role_idObject

Gets the guestUserRoleId property value. Represents role templateId for the role that should be granted to guest user. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b).

Returns:

  • a guid



175
176
177
# File 'lib/models/authorization_policy.rb', line 175

def guest_user_role_id
    return @guest_user_role_id
end

#guest_user_role_id=(value) ⇒ Object

Sets the guestUserRoleId property value. Represents role templateId for the role that should be granted to guest user. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b).

Parameters:

  • value

    Value to set for the guestUserRoleId property.

Returns:

  • a void



183
184
185
# File 'lib/models/authorization_policy.rb', line 183

def guest_user_role_id=(value)
    @guest_user_role_id = 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)


191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/models/authorization_policy.rb', line 191

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("allowEmailVerifiedUsersToJoinOrganization", @allow_email_verified_users_to_join_organization)
    writer.write_enum_value("allowInvitesFrom", @allow_invites_from)
    writer.write_boolean_value("allowUserConsentForRiskyApps", @allow_user_consent_for_risky_apps)
    writer.write_boolean_value("allowedToSignUpEmailBasedSubscriptions", )
    writer.write_boolean_value("allowedToUseSSPR", @allowed_to_use_s_s_p_r)
    writer.write_boolean_value("blockMsolPowerShell", @block_msol_power_shell)
    writer.write_object_value("defaultUserRolePermissions", @default_user_role_permissions)
    writer.write_guid_value("guestUserRoleId", @guest_user_role_id)
end