Microsoft User Login

From docs
Jump to: navigation, search

Mobile_API » Microsoft Login

Base URL

https://apimobile.callproof.com

Endpoint

/api/microsoft-login

Purpose

Authenticates an existing CallProof user through their Microsoft account. The Microsoft account email must match an existing, active CallProof account that is eligible for mobile access.

HTTP Method

POST

Headers

Header Required Description
Content-Type Yes application/x-www-form-urlencoded

Security

  • No – No prior CallProof authentication is required. Valid Microsoft authentication credentials must be supplied.

Parameters

Request Body Fields

Parameter Type Required Description
access_token string Yes A valid Microsoft access token used to retrieve and verify the user's Microsoft identity.
token string Yes The Microsoft identity token associated with the sign-in session.
device_type string Yes The mobile platform. Accepted values are android and ios.
refresh_token string No A Microsoft refresh token used to maintain access to connected Microsoft services.
expires_in integer No The number of seconds before the supplied Microsoft access token expires.
device_id_app string No The device notification token used for notifications and device recognition.
device_phone_number string No The phone number associated with the mobile device.
device_time_zone string No The device's time zone. When omitted, a time zone may be determined automatically.
cp_version string No The installed CallProof application version.
product string No The device product or model identifier.
resolution string No The device screen resolution.
device_name string No The user-visible device name.
is_tablet boolean No Indicates whether the device is a tablet.
android_version string No The Android operating-system version.
android_api_version string No The Android API version.
android_apk_version string No The installed Android application package version.
is_callLog_build boolean No Indicates whether the Android application supports call-log capabilities.
ios_version string No The iOS operating-system version.

Successful Response (200)

The Microsoft identity was verified, matched to an eligible CallProof account, and authenticated access credentials were issued.

Response Field Type Description
clientStatusCode integer Business-level response status. A successful login returns 200.
data.token_type string The authentication token type.
data.expires_in integer The CallProof access token validity period.
data.access_token string The credential used to access authenticated CallProof API endpoints.
data.refresh_token string The credential used to obtain a new CallProof access token.
data.is_2fa_enabled boolean Indicates whether two-factor authentication is enabled for the user or company.
data.is_verified boolean Indicates whether the applicable two-factor authentication requirement has been satisfied.
data.email string The authenticated user's Microsoft email address.
uri string The URL of the Microsoft login request.

Error Responses

Microsoft login failures are generally returned with HTTP status 200. The business-level result is provided through clientStatusCode.

HTTP Status Code Client Status Code Meaning
200 401 A required field, such as access_token, token, or device_type, was not supplied.
200 401 Device information could not be associated with the user.
200 400 The device type is not supported.
200 400 The Microsoft access token is invalid, expired, or could not be verified.
200 400 The Microsoft email does not match an existing CallProof account.
200 400 The user or associated company account is disabled.
200 400 The account is not eligible for this type of access and must be updated through CallProof Support.
200 400 Microsoft authentication could not be completed.

Error Response Fields

Response Field Type Description
clientStatusCode integer The business-level error status, typically 400 or 401.
error.code integer The business error code, generally 1500.
error.message string A plain-language explanation of the login failure.
uri string The URL of the Microsoft login request.