account_mfas
Creates, updates, deletes, gets or lists an account_mfas resource.
Overview​
| Name | account_mfas |
| Type | Resource |
| Id | ovh.ms_services.account_mfas |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
task_pending_id | integer | Pending task for Multi Factor Authentication (wire: taskPendingId) |
activated | boolean | Indicates if Multi Factor Authentication is activated on this account |
state | string | Current status of Multi Factor Authentication feature (creating, deleting, disabled, modifying, ok, reopening, suspended, suspending) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name, user_principal_name | Get the account MFA. Returns whether MFA is activated on the Active Directory account, and its state. | |
create | insert | service_name, user_principal_name | Create the account MFA. Creates MFA for the Active Directory account and returns the task. MFA is enabled by default when created. | |
delete | delete | service_name, user_principal_name | Delete the account MFA. Removes the MFA of the Active Directory account and returns the task. The user signs in with a password only. | |
disable | exec | serviceName, userPrincipalName, period | Disable the account MFA. Disables MFA on the Active Directory account for period hours, and returns the task. | |
enable | exec | serviceName, userPrincipalName | Enable the account MFA. Enables MFA on the Active Directory account and returns the task. MFA is enabled by default when created. | |
reset | exec | serviceName, userPrincipalName | Reset the account MFA. Resets the MFA of the Active Directory account, so that the user registers again at the next sign-in. Returns the task. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
serviceName | string | The internal name of your Active Directory organization |
service_name | string | The internal name of your Active Directory organization (wire: serviceName) |
userPrincipalName | string | User Principal Name |
user_principal_name | string | User Principal Name (wire: userPrincipalName) |
SELECT examples​
- get
Get the account MFA. Returns whether MFA is activated on the Active Directory account, and its state.
SELECT
task_pending_id,
activated,
state
FROM ovh.ms_services.account_mfas
WHERE service_name = '{{ service_name }}' -- required
AND user_principal_name = '{{ user_principal_name }}' -- required
;
INSERT examples​
- create
- Manifest
Create the account MFA. Creates MFA for the Active Directory account and returns the task. MFA is enabled by default when created.
INSERT INTO ovh.ms_services.account_mfas (
service_name,
user_principal_name
)
SELECT
'{{ service_name }}',
'{{ user_principal_name }}'
RETURNING
id,
finish_date,
function,
status,
todo_date
;
# Description fields are for documentation purposes
- name: account_mfas
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the account_mfas resource.
- name: user_principal_name
value: "{{ user_principal_name }}"
description: Required parameter for the account_mfas resource.
DELETE examples​
- delete
Delete the account MFA. Removes the MFA of the Active Directory account and returns the task. The user signs in with a password only.
DELETE FROM ovh.ms_services.account_mfas
WHERE service_name = '{{ service_name }}' --required
AND user_principal_name = '{{ user_principal_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- disable
- enable
- reset
Disable the account MFA. Disables MFA on the Active Directory account for period hours, and returns the task.
EXEC ovh.ms_services.account_mfas.disable
@serviceName='{{ serviceName }}' --required,
@userPrincipalName='{{ userPrincipalName }}' --required
@@json=
'{
"period": {{ period }}
}'
;
Enable the account MFA. Enables MFA on the Active Directory account and returns the task. MFA is enabled by default when created.
EXEC ovh.ms_services.account_mfas.enable
@serviceName='{{ serviceName }}' --required,
@userPrincipalName='{{ userPrincipalName }}' --required
;
Reset the account MFA. Resets the MFA of the Active Directory account, so that the user registers again at the next sign-in. Returns the task.
EXEC ovh.ms_services.account_mfas.reset
@serviceName='{{ serviceName }}' --required,
@userPrincipalName='{{ userPrincipalName }}' --required
;