482 строки
17 KiB
JSON
482 строки
17 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"version": "1.0.0",
|
|
"title": "Azure AD authentication methods",
|
|
"description": "Manage Azure AD phone authentication methods for MFA and SSPR"
|
|
},
|
|
"host": "graph.microsoft.com",
|
|
"basePath": "/",
|
|
"schemes": [
|
|
"https"
|
|
],
|
|
"consumes": [],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/beta/users/{userID}/authentication/phoneMethods": {
|
|
"get": {
|
|
"responses": {
|
|
"default": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@odata.context": {
|
|
"type": "string",
|
|
"description": "@odata.context"
|
|
},
|
|
"value": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id",
|
|
"title": "ID",
|
|
"x-ms-visibility": "important"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "phoneNumber",
|
|
"title": "phoneNumber",
|
|
"x-ms-visibility": "important"
|
|
},
|
|
"phoneType": {
|
|
"type": "string",
|
|
"description": "phoneType",
|
|
"title": "phoneType",
|
|
"x-ms-visibility": "important"
|
|
},
|
|
"smsSignInState": {
|
|
"type": "string",
|
|
"description": "smsSignInState",
|
|
"title": "smsSignInState",
|
|
"x-ms-visibility": "important"
|
|
}
|
|
}
|
|
},
|
|
"description": "value"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"summary": "List phoneMethods",
|
|
"description": "Retrieve a list of phone authentication method objects. This will return up to three objects, as a user can have up to three phones usable for authentication.",
|
|
"operationId": "ListPhonemethods",
|
|
"parameters": [
|
|
{
|
|
"name": "userID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-visibility": "important",
|
|
"description": "Enter the ID or UPN of the user"
|
|
}
|
|
],
|
|
"x-ms-visibility": "important"
|
|
},
|
|
"post": {
|
|
"summary": "Create phoneAuthenticationMethod",
|
|
"description": "Add a new phone authentication method. 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 preexisting mobile phone will fail. 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 will attempt to register the number for use in that system.",
|
|
"operationId": "CreatePhoneauthenticationmethod",
|
|
"parameters": [
|
|
{
|
|
"name": "userID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"x-ms-visibility": "important"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "For example, +1 5555551234 or +1 5555551234x123 (extension)",
|
|
"title": "phone number",
|
|
"x-ms-visibility": "important"
|
|
},
|
|
"phoneType": {
|
|
"type": "string",
|
|
"description": "Select the phone type",
|
|
"title": "phone type",
|
|
"enum": [
|
|
"mobile",
|
|
"alternateMobile",
|
|
"office"
|
|
],
|
|
"x-ms-visibility": "important"
|
|
}
|
|
},
|
|
"required": [
|
|
"phoneType",
|
|
"phoneNumber"
|
|
],
|
|
"x-ms-visibility": "important"
|
|
},
|
|
"x-ms-visibility": "important"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "201",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@odata.context": {
|
|
"type": "string",
|
|
"description": "@odata.context"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "phoneNumber"
|
|
},
|
|
"phoneType": {
|
|
"type": "string",
|
|
"description": "phoneType"
|
|
},
|
|
"smsSignInState": {
|
|
"type": "string",
|
|
"description": "smsSignInState"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-ms-visibility": "important"
|
|
}
|
|
},
|
|
"/beta/users/{userID}/authentication/phoneMethods/3179e48a-750b-4051-897c-87b9720928f7/enableSmsSignIn": {
|
|
"post": {
|
|
"summary": "Enable Sms SignIn",
|
|
"description": "Enable SMS sign-in for an existing mobile phone number. 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.",
|
|
"operationId": "EnableSmsSignin",
|
|
"parameters": [
|
|
{
|
|
"name": "userID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Enter the ID or UPN of the user"
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "code"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"innerError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"target": {
|
|
"type": "string",
|
|
"description": "target"
|
|
},
|
|
"date": {
|
|
"type": "string",
|
|
"description": "date"
|
|
},
|
|
"request-id": {
|
|
"type": "string",
|
|
"description": "request-id"
|
|
}
|
|
},
|
|
"description": "innerError"
|
|
}
|
|
},
|
|
"description": "error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/beta/users/{userID}/authentication/phoneMethods/3179e48a-750b-4051-897c-87b9720928f7/disableSmsSignIn": {
|
|
"post": {
|
|
"summary": "Disable Sms SignIn",
|
|
"description": "Disable SMS sign-in for an existing mobile phone number. Note: The number will no longer be available for SMS sign-in, which can prevent your user from signing in.",
|
|
"operationId": "DisableSmsSignin",
|
|
"parameters": [
|
|
{
|
|
"name": "userID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Enter the ID or UPN of the user"
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "default",
|
|
"schema": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/beta/users/{userID}/authentication/phoneMethods/{phonemethodID}": {
|
|
"get": {
|
|
"summary": "Get phoneMethod",
|
|
"description": "Retrieve a single phoneAuthenticationMethod object.",
|
|
"operationId": "GetPhonemethod",
|
|
"parameters": [
|
|
{
|
|
"name": "userID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Enter the ID or UPN of the user"
|
|
},
|
|
{
|
|
"name": "phonemethodID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"enum": [
|
|
"e37fc753-ff3b-4958-9484-eaa9425c82bc",
|
|
"b6332ec1-7057-4abe-9331-3d72feddfe41",
|
|
"3179e48a-750b-4051-897c-87b9720928f7"
|
|
],
|
|
"description": "e37fc753-ff3b-4958-9484-eaa9425c82bc (office) b6332ec1-7057-4abe-9331-3d72feddfe41 (alternate mobile ) 3179e48a-750b-4051-897c-87b9720928f7 (mobile)"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "200",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@odata.context": {
|
|
"type": "string",
|
|
"description": "@odata.context"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "phoneNumber"
|
|
},
|
|
"phoneType": {
|
|
"type": "string",
|
|
"description": "phoneType"
|
|
},
|
|
"smsSignInState": {
|
|
"type": "string",
|
|
"description": "smsSignInState"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "code"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"innerError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"description": "message"
|
|
},
|
|
"date": {
|
|
"type": "string",
|
|
"description": "date"
|
|
},
|
|
"request-id": {
|
|
"type": "string",
|
|
"description": "request-id"
|
|
}
|
|
},
|
|
"description": "innerError"
|
|
}
|
|
},
|
|
"description": "error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"summary": "Delete phoneAuthenticationMethod",
|
|
"description": "Delete a user's phone authentication method. Note: This removes the phone number from the user and they will no longer be able to use the number for authentication, whether via SMS or voice calls. Remember that a user cannot have an alternateMobile number without a mobile number. If you want to remove a mobile number from a user that also has an alternateMobile number, first update the mobile number to the new number, then delete the alternateMobile number. If the phone number is the user's default Azure multi-factor authentication (MFA) authentication method, it cannot be deleted. Have the user change their default authentication method, and then delete the number.",
|
|
"operationId": "DeletePhoneauthenticationmethod",
|
|
"parameters": [
|
|
{
|
|
"name": "userID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Enter the ID or UPN of the user"
|
|
},
|
|
{
|
|
"name": "phonemethodID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Select the phonemethod ID",
|
|
"enum": [
|
|
"e37fc753-ff3b-4958-9484-eaa9425c82bc",
|
|
"b6332ec1-7057-4abe-9331-3d72feddfe41",
|
|
"3179e48a-750b-4051-897c-87b9720928f7"
|
|
]
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "default",
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"summary": "Update phoneAuthenticationMethod",
|
|
"description": "Update the phone number associated with a phone authentication method. 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.",
|
|
"operationId": "UpdatePhoneauthenticationmethod",
|
|
"parameters": [
|
|
{
|
|
"name": "userID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Enter the ID or UPN of the user"
|
|
},
|
|
{
|
|
"name": "phonemethodID",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Select the phone method ID",
|
|
"x-ms-summary": "",
|
|
"enum": [
|
|
"e37fc753-ff3b-4958-9484-eaa9425c82bc",
|
|
"b6332ec1-7057-4abe-9331-3d72feddfe41",
|
|
"3179e48a-750b-4051-897c-87b9720928f7"
|
|
]
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "For example, +1 5555551234 or +1 5555551234x123 (extension)",
|
|
"title": "phone number",
|
|
"x-ms-visibility": "important"
|
|
},
|
|
"phoneType": {
|
|
"type": "string",
|
|
"description": "Select the phoneType",
|
|
"title": "phonetype",
|
|
"enum": [
|
|
"mobile",
|
|
"alternateMobile",
|
|
"office"
|
|
],
|
|
"x-ms-visibility": "important"
|
|
}
|
|
},
|
|
"required": [
|
|
"phoneNumber",
|
|
"phoneType"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": "default",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@odata.context": {
|
|
"type": "string",
|
|
"description": "@odata.context"
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"description": "id"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string",
|
|
"description": "phoneNumber"
|
|
},
|
|
"phoneType": {
|
|
"type": "string",
|
|
"description": "phoneType"
|
|
},
|
|
"smsSignInState": {
|
|
"type": "string",
|
|
"description": "smsSignInState"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {},
|
|
"parameters": {},
|
|
"responses": {},
|
|
"securityDefinitions": {
|
|
"oauth2_auth": {
|
|
"type": "oauth2",
|
|
"flow": "accessCode",
|
|
"authorizationUrl": "https://login.windows.net/common/oauth2/authorize",
|
|
"tokenUrl": "https://login.windows.net/common/oauth2/authorize",
|
|
"scopes": {}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"oauth2_auth": []
|
|
}
|
|
],
|
|
"tags": []
|
|
} |