user object
Represents a Microsoft Azure Mobile Services user.
Members
This object contains the following members:
Functions
getIdentities
Syntax |
Return Type |
Description |
||
---|---|---|---|---|
user.getIdentities(options) |
undefined |
Asynchronously accesses identity information for the logged-in user. This function takes an options parameter, which is used to supply a success and error callback functions, as follows:
After a user has been authenticated, Mobile Services passes to the success function an identities object, which contains the following fields:
An error object is supplied to the error callback function when an error occurs. The error callback function is optional. Note Mobile Services is able to automatically retrieve additional user information from your identity provider. For more information about how to enable and use this preview functionality, see the Enhanced users feature blog post. |
||
user.getIdentities() |
object |
Synchronously requests a JavaScript Object Notation (JSON) object that contains identity information, in the following format:
The access_token_secret_value may not be available for all identity providers. |
Properties
Property name |
Type |
Description |
---|---|---|
accessTokens |
object |
A JavaScript Object Notation (JSON) object that contains the access token, in the following format:
|
level |
string |
The level of authentication, which can be one of the following:
|
userId |
string |
The user ID of an authenticated user. When a user is not authenticated, this property returns undefined. |
Remarks
Scripts registered to table operations are always passed an instance of the user object, regardless of whether the operation is authenticated.
In a custom API, the user object is accessed from the request object supplied to the function.