Skip to main content

authentication_phone_methods

Creates, updates, deletes, gets or lists an authentication_phone_methods resource.

Overview

Nameauthentication_phone_methods
TypeResource
Identra_id.users.authentication_phone_methods

Fields

The following fields are returned by SELECT queries:

Retrieved navigation property

NameDatatypeDescription
idstringThe unique identifier for an entity. Read-only.
createdDateTimestring (date-time)Represents the date and time when an entity was created. Read-only. (pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$)
phoneNumberstringThe phone number to text or call for authentication. Phone numbers use the format +{country code} {number}x{extension}, with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating or updating if they don't match the required format.
phoneTypeThe type of this phone. The possible values are: mobile, alternateMobile, or office.
smsSignInStateWhether a phone is ready to be used for SMS sign-in or not. The possible values are: notSupported, notAllowedByPolicy, notEnabled, phoneNumberNotUnique, ready, or notConfigured, unknownFutureValue.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectuser_id, phone_authentication_method_idThe phone numbers registered to a user for authentication.
listselectuser_idThe phone numbers registered to a user for authentication.
insertinsertuser_idAdd a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system.
updateupdateuser_id, phone_authentication_method_idUpdate a user's phone number associated with a phone authentication method object. You can't change a phone's type. To change a phone's type, add a new number of the desired type and then delete the object with the original type. If a user is enabled by policy to use SMS to sign in and the mobile number is changed, the system will attempt to register the number for use in that system. Self-service operations aren't supported.
deletedeleteuser_id, phone_authentication_method_idIf-Match
disable_sms_sign_inexecuser_id, phone_authentication_method_idDisable SMS sign-in for an existing mobile phone number registered to a user. The number will no longer be available for SMS sign-in, which can prevent your user from signing in.
enable_sms_sign_inexecuser_id, phone_authentication_method_idEnable SMS sign-in for an existing mobile phone number registered to a user. To be successfully enabled:

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.

NameDatatypeDescription
phone_authentication_method_idstringThe unique identifier of phoneAuthenticationMethod
user_idstringThe unique identifier of user
If-MatchstringETag

SELECT examples

The phone numbers registered to a user for authentication.

SELECT
id,
createdDateTime,
phoneNumber,
phoneType,
smsSignInState
FROM entra_id.users.authentication_phone_methods
WHERE user_id = '{{ user_id }}' -- required
AND phone_authentication_method_id = '{{ phone_authentication_method_id }}' -- required
;

INSERT examples

Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system.

INSERT INTO entra_id.users.authentication_phone_methods (
id,
createdDateTime,
phoneNumber,
phoneType,
smsSignInState,
user_id
)
SELECT
'{{ id }}',
'{{ createdDateTime }}',
'{{ phoneNumber }}',
'{{ phoneType }}',
'{{ smsSignInState }}',
'{{ user_id }}'
RETURNING
id,
createdDateTime,
phoneNumber,
phoneType,
smsSignInState
;

UPDATE examples

Update a user's phone number associated with a phone authentication method object. You can't change a phone's type. To change a phone's type, add a new number of the desired type and then delete the object with the original type. If a user is enabled by policy to use SMS to sign in and the mobile number is changed, the system will attempt to register the number for use in that system. Self-service operations aren't supported.

UPDATE entra_id.users.authentication_phone_methods
SET
id = '{{ id }}',
createdDateTime = '{{ createdDateTime }}',
phoneNumber = '{{ phoneNumber }}',
phoneType = '{{ phoneType }}',
smsSignInState = '{{ smsSignInState }}'
WHERE
user_id = '{{ user_id }}' --required
AND phone_authentication_method_id = '{{ phone_authentication_method_id }}' --required
RETURNING
id,
createdDateTime,
phoneNumber,
phoneType,
smsSignInState;

DELETE examples

No description available.

DELETE FROM entra_id.users.authentication_phone_methods
WHERE user_id = '{{ user_id }}' --required
AND phone_authentication_method_id = '{{ phone_authentication_method_id }}' --required
AND If-Match = '{{ If-Match }}'
;

Lifecycle Methods

Disable SMS sign-in for an existing mobile phone number registered to a user. The number will no longer be available for SMS sign-in, which can prevent your user from signing in.

EXEC entra_id.users.authentication_phone_methods.disable_sms_sign_in
@user_id='{{ user_id }}' --required,
@phone_authentication_method_id='{{ phone_authentication_method_id }}' --required
;