| title | phoneAuthenticationMethod: enableSmsSignIn |
|---|---|
| description | Enable SMS sign-in for a mobile phone number registered to a user. |
| ms.localizationpriority | medium |
| author | luc-msft |
| ms.reviewer | intelligentaccesspm |
| ms.subservice | entra-sign-in |
| doc_type | apiPageType |
| ms.date | 11/21/2024 |
Namespace: microsoft.graph
Enable SMS sign-in for an existing mobile phone number registered to a user. To be successfully enabled:
- The phone must have
"phoneType": "mobile". - The phone must be unique in the SMS sign-in system (no one else can also be using that number).
- The user must be enabled for SMS sign-in in the authentication methods policy.
[!INCLUDE national-cloud-support]
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
| Permission type | Least privileged permissions | Higher privileged permissions |
|---|---|---|
| Delegated (work or school account) | UserAuthenticationMethod.ReadWrite | UserAuthenticationMethod.ReadWrite.All |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | Not supported. | Not supported. |
| Permission type | Least privileged permissions | Higher privileged permissions |
|---|---|---|
| Delegated (work or school account) | UserAuthenticationMethod.ReadWrite.All | Not available. |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | UserAuthenticationMethod.ReadWrite.All | Not available. |
[!INCLUDE rbac-authentication-methods-apis-write-others]
Enable SMS sign-in for your own mobile phone authentication method.
POST /me/authentication/phoneMethods/{mobilePhoneMethodId}/enableSmsSignIn[!INCLUDE me-apis-sign-in-note]
Enable SMS sign-in for your own or another user's mobile phone authentication method.
POST /users/{id | userPrincipalName}/authentication/phoneMethods/{mobilePhoneMethodId}/enableSmsSignInThe value of mobilePhoneMethodId for the mobile phoneType is 3179e48a-750b-4051-897c-87b9720928f7.
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 204 No Content response code. It doesn't return anything in the response body.
The following example shows how to call this API.
The following example shows a request.
POST https://graph.microsoft.com/v1.0/me/authentication/phoneMethods/3179e48a-750b-4051-897c-87b9720928f7/enableSmsSignIn[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content