Retrieve User Information

get

/mobile/platform/users/{username}

Retrieves information about the current user.

  • When the user is a mobile user, this operation retrieves the user name, first name, last name, email address, and the user's profile from Oracle Identity Cloud Service.
  • When the user is a virtual user, this operation retrieves the user name.
  • When the user is a social user (that is, signed in using social identity), this operation retrieves the user's mobile ID and identity provider.

If you don't know the user name, then use ~ for the username path parameter to indicate the current user.

Permissions

The authorized user can be a social user, virtual user, or a mobile user. If the authorized user is a mobile user, then the user must have a role that's associated with the mobile backend.

Request

Path Parameters
  • The user name of the current user, which is the user in the Authorization HTTP request header. Use ~ to indicate the current user. If you specify the user name, it must match the user name that's in the Authorization HTTP request header.

Query Parameters
  • You can use this parameter to request a subset of the mobile user properties. This parameter doesn't apply to virtual or social users.

    Example:

    To retrieve only the properties firstName and lastName for a mobile user, the call would pass the following query parameter:

    /mobile/platform/users/~?fields=firstName,lastName

    The call returns a response like this:

    {
      "firstName": "Joe",
      "lastName": "Doe"
    }
    

    To retrieve only the attributes from user's Oracle Identity Cloud Service profile, the call would pass the following query parameter:

    /mobile/platform/users/~?fields=attributes

    The call returns a response like this, where the attributes object contains raw profile attributes, including the same custom properties that are in a response from GET /mobile/platform/users/me.

    {
      "attributes": {
        "id": "2e63bfeea6a14101b91256b4036dff94",
        "displayName": "Joe Doe",
        "emails": [
          {
            "primary": false,
            "secondary": false,
            "value": "joe.doe@oracle.com",
            "type": "recovery",
            "verified": false
          }
        ],
        "name": {
          "givenName": "Joe",
          "familyName": "Mobile User",
          "formatted": "Test Mobile User"
        },
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
          "employeeNumber": "245562716"
        },
        "urn:ietf:params:scim:schemas:idcs:extension:custom:User": {
          "custom_attribute": "1076270704"
        },
        "schemas": [
          "urn:ietf:params:scim:schemas:core:2.0:User",
          "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
          "urn:ietf:params:scim:schemas:idcs:extension:custom:User"
        ]
      }
    }
    
Back to Top

Response

Supported Media Types

200 Response

The user information was retrieved successfully.
Body ()
Root Schema : User Information
Type: object
Title: User Information
Information about the current social, virtual, or mobile user.
Match One
Show Source
  • Mobile User Information
    Title: Mobile User Information
    Information that's returned when the current user is a mobile user.
  • Virtual User Information
    Title: Virtual User Information
    Information that's returned when the current user is a virtual user.
  • Social User Information
    Title: Social User Information
    Additional Properties Allowed: true
    Information that's returned when the current user is a social user (that is, signed in using social identity).
Nested Schema : Mobile User Information
Type: object
Title: Mobile User Information
Information that's returned when the current user is a mobile user.
Show Source
Nested Schema : Virtual User Information
Type: object
Title: Virtual User Information
Information that's returned when the current user is a virtual user.
Show Source
  • Pattern: [a-zA-Z0-9][a-zA-Z0-9\-_\.\@]*
    The user name for the user.
Nested Schema : Social User Information
Type: object
Title: Social User Information
Additional Properties Allowed: true
Information that's returned when the current user is a social user (that is, signed in using social identity).
Show Source
Nested Schema : User Profile
Type: object
Title: User Profile
Additional Properties Allowed: true
User identity information that follows the System for Cross-Domain Identity Management (SCIM) standard.
Show Source
Nested Schema : Links that each reference a single object.
Type: array
Title: Links that each reference a single object.
Minimum Number of Items: 1
Unique Items Required: true
Show Source
Nested Schema : addresses
Type: array
Physical mailing addresses for the user, such as work, home, and other.
Show Source
Nested Schema : emails
Type: array
A complex attribute that represents emails.
Show Source
Nested Schema : entitlements
Type: array
A list of entitlements for the user.
Show Source
Nested Schema : groups
Type: array
A list of groups that the user belongs to, either thorough direct membership, nested groups, or dynamic calculation.
Show Source
  • Group
    Title: Group
    A group that the user belongs to, either thorough direct membership, nested groups, or dynamic calculation.
Nested Schema : Created By
Type: object
Title: Created By
The user or app that created this resource.
Show Source
Nested Schema : Last Modified By
Type: object
Title: Last Modified By
The user or app that modified this resource.
Show Source
Nested Schema : ims
Type: array
The user's instant messaging addresses.
Show Source
Nested Schema : Metadata
Type: object
Title: Metadata
A complex object that contains the resource's metadata. All sub-attributes are optional.
Show Source
Nested Schema : Full Name
Type: object
Title: Full Name
A complex object that contains attributes that represent the user's full name.
Show Source
Nested Schema : phoneNumbers
Type: array
A list of the user's phone numbers.
Show Source
Nested Schema : photos
Type: array
A list of URLs of photos for the user.
Show Source
Nested Schema : roles
Type: array
A list of roles for the user that collectively represent who the user is.
Show Source
  • Role
    Title: Role
    A complex attribute that represents a role that's been granted to the user.
Nested Schema : Enterprise
Type: object
Title: Enterprise
Enterprise user information.
Show Source
Nested Schema : urn:ietf:params:scim:schemas:oracle:idcs:extension:crossSso:User
Type: object
This extension defines attributes to manage the user account for cross-tenant SSO.
Show Source
Nested Schema : IDCS Self-Service Extension
Type: object
Title: IDCS Self-Service Extension
IDCS self-service schema extension.
Show Source
  • Minimum Length: 1
    Maximum Length: 500
    The current password is required if the user attempts to change the values of attributes that are used in recovering or verifying the user's own identity. If the current password is specified, it's used to authenticate the user regardless of any change in these attribute values.
Nested Schema : Multi-Factor Authentication
Type: object
Title: Multi-Factor Authentication
This extension defines attributes that are used to manage multi-factored authentication (MFA).
Show Source
  • bypassCodes
    A list of bypass codes that belong to the user.
  • devices
    A list of devices that belong to the user.
  • The number of incorrect multi-factor authentication login attempts that the user made. The user is locked if this reaches the threshold specified in the maxIncorrectAttempts attribute in AuthenticationFactorSettings.
  • Allowed Values: [ "ENROLLED", "IGNORED", "UN_ENROLLED", "DISABLED" ]
    The user's opted-in status for multi-factor authentication (MFA).
  • Minimum Length: 1
    Maximum Length: 40
    Allowed Values: [ "SMS", "TOTP", "PUSH", "OFFLINETOTP", "SECURITY_QUESTIONS", "VOICE" ]
    The preferred authentication factor type.
  • preferredDevice
    The user's preferred device.
  • trustedUserAgents
    A list of the trusted user agents that the user owns. Multi-factored authentication uses trusted user agents to authenticate users. A user agent is a software application that a user uses to issue requests. For example, a user agent could be a particular browser (possibly one of several executing on a desktop or laptop) or a particular mobile application (again, one of several executing on a particular mobile device). A user agent is trusted once the multi-factored authentication has verified it in some way.
Nested Schema : urn:ietf:params:scim:schemas:oracle:idcs:extension:passwordState:User
Type: object
This extension defines attributes that are used to manage account passwords.
Show Source
Nested Schema : POSIX
Type: object
Title: POSIX
POSIX user extension.
Show Source
Nested Schema : Security Question Extension
Type: object
Title: Security Question Extension
This extension defines attributes used to store the user's security questions.
Show Source
  • secQuestions
    The security questions and answers that were provided by the end-user for account recovery and/or multi-factor authentication (MFA). While setting up security questions, the end-user can also provide a hint along with the answer.
Nested Schema : Self-Registration
Type: object
Title: Self-Registration
This extension defines attributes used to manage the self-registration profile linked to the user.
Show Source
Nested Schema : IDCS User Information
Type: object
Title: IDCS User Information
Identity Cloud Serice (IDCS) user information.
Show Source
Nested Schema : urn:ietf:params:scim:schemas:oracle:idcs:extension:userState:User
Type: object
This extension defines the attributes that are used to manage account passwords.
Show Source
Nested Schema : x509Certificates
Type: array
A list of x509 certificates issued to the user.
Show Source
Nested Schema : Physical Mailing Address
Type: object
Title: Physical Mailing Address
A complex attribute that represents the user's physical mailing address, such as a work address or home address.
Show Source
  • Minimum Length: 1
    Maximum Length: 50
    The name of the country.
  • Minimum Length: 1
    Maximum Length: 500
    The full mailing address that's formatted for display or a mailing label. The value can contain newline characters.
  • Minimum Length: 1
    Maximum Length: 50
    The city or locality.
  • Maximum Length: 50
    The zipcode or postal code.
  • A Boolean value that indicates the primary or preferred address. Only one address may have this value set to `true`.
  • Minimum Length: 1
    Maximum Length: 100
    The state or region.
  • Minimum Length: 1
    Maximum Length: 200
    The full street address component, which can include the house number, street name, PO Box, and multi-line extended street address information. The value can contain newline characters.
  • Allowed Values: [ "work", "home", "other" ]
    A label that indicates the address's function. For example, 'work' or 'home'.
Nested Schema : Email Address
Type: object
Title: Email Address
A complex attribute that represents an email address.
Show Source
  • A Boolean value that indicates whether the email address is the primary email address. Only one email address may have this value set to true.
  • Allowed Values: [ "work", "home", "other", "recovery" ]
    The type of email address
  • Minimum Length: 5
    Maximum Length: 100
    An email address.
Nested Schema : User's Entitlement
Type: object
Title: User's Entitlement
A complex attribute that represents an entitlement that the user has.
Show Source
  • Minimum Length: 1
    Maximum Length: 100
    A human-readable name, which is primarily used for display purposes.
  • A Boolean value that indicates the primary or preferred entitlement. Only one entitlement may have this value set to `true`.
  • A label that indicates the entitlement's function.
  • Minimum Length: 1
    Maximum Length: 100
    The value of an entitlement.
Nested Schema : Group
Type: object
Title: Group
A group that the user belongs to, either thorough direct membership, nested groups, or dynamic calculation.
Show Source
Nested Schema : Instant Messaging Service (IMS) Address
Type: object
Title: Instant Messaging Service (IMS) Address
A complex attribute that represents an IMS address.
Show Source
  • Minimum Length: 1
    Maximum Length: 100
    A human-readable name, which is primarily used for display purposes.
  • A Boolean value that indicates the primary or preferred IM addess. Only one IM address may have this value set to `true`.
  • Allowed Values: [ "aim", "gtalk", "icq", "xmpp", "msn", "skype", "qq", "yahoo" ]
    A label that indicates the IM address's function. For example, `aim`, `gtalk`, or `mobile`
  • Minimum Length: 1
    Maximum Length: 100
    The user's instant messaging address.
Nested Schema : phoneNumbers
Type: object
A complex attribute that represents a phone number.
Show Source
  • Minimum Length: 1
    Maximum Length: 100
    A human-readable name, which is primarily used for display purposes. READ ONLY
  • A Boolean value that indicates the whether this number is the preferred or primary phone number. Only one phone number may have this value set to true.
  • Allowed Values: [ "work", "home", "mobile", "fax", "pager", "other", "recovery" ]
    A label that indicates the phone number's function. For example, work, home, or mobile.
  • Minimum Length: 1
    Maximum Length: 100
    The user's phone number.
  • A Boolean value that indicates if the phone number is verified.
Nested Schema : Photo URL
Type: object
Title: Photo URL
A complex attribute that represents a photo URL.
Show Source
  • Minimum Length: 1
    Maximum Length: 100
    A human-readable name, which is primarily used for display purposes.
  • A Boolean value that indicates the primary or preferred photo. Only one photo may have this value set to true.
  • Allowed Values: [ "photo", "thumbnail" ]
    A label that indicates the photo's function. For example, photo or thumbnail.
  • Minimum Length: 1
    Maximum Length: 2000
    The URL of a photo for the user.
Nested Schema : Role
Type: object
Title: Role
A complex attribute that represents a role that's been granted to the user.
Show Source
Nested Schema : Manager
Type: object
Title: Manager
The user's manager. A complex type that optionally allows representation of an organizational hierarchy by referencing the id attribute of another user.
Show Source
Nested Schema : bypassCodes
Type: array
A list of bypass codes that belong to the user.
Show Source
Nested Schema : devices
Type: array
A list of devices that belong to the user.
Show Source
Nested Schema : preferredDevice
Type: object
The user's preferred device.
Show Source
Nested Schema : trustedUserAgents
Type: array
A list of the trusted user agents that the user owns. Multi-factored authentication uses trusted user agents to authenticate users. A user agent is a software application that a user uses to issue requests. For example, a user agent could be a particular browser (possibly one of several executing on a desktop or laptop) or a particular mobile application (again, one of several executing on a particular mobile device). A user agent is trusted once the multi-factored authentication has verified it in some way.
Show Source
  • Trusted User Agent
    Title: Trusted User Agent
    Multi-factored authentication uses trusted user agents to authenticate users. A user agent is a software application that a user uses to issue requests. For example, a user agent could be a particular browser (possibly one of several executing on a desktop or laptop) or a particular mobile application (again, one of several executing on a particular mobile device). A user agent is trusted once the multi-factored authentication has verified it in some way.
Nested Schema : Bypass Code
Type: object
Title: Bypass Code
The user's bypass code.
Show Source
Nested Schema : User Device
Type: object
Title: User Device
A device that belongs to the user.
Show Source
Nested Schema : Trusted User Agent
Type: object
Title: Trusted User Agent
Multi-factored authentication uses trusted user agents to authenticate users. A user agent is a software application that a user uses to issue requests. For example, a user agent could be a particular browser (possibly one of several executing on a desktop or laptop) or a particular mobile application (again, one of several executing on a particular mobile device). A user agent is trusted once the multi-factored authentication has verified it in some way.
Show Source
Nested Schema : secQuestions
Type: array
The security questions and answers that were provided by the end-user for account recovery and/or multi-factor authentication (MFA). While setting up security questions, the end-user can also provide a hint along with the answer.
Show Source
  • Security Question
    Title: Security Question
    Security question and answer for account recovery and/or multi-factor authentication (MFA). While setting up security questions, you can also provide a hint along with the answer.
Nested Schema : Security Question
Type: object
Title: Security Question
Security question and answer for account recovery and/or multi-factor authentication (MFA). While setting up security questions, you can also provide a hint along with the answer.
Show Source
Nested Schema : selfRegistrationProfile
Type: object
The self-registration profile that's used when the user is self-registered.
Show Source
Nested Schema : accounts
Type: array
A list of accounts that are assigned to the user.
Show Source
Nested Schema : appRoles
Type: array
A list of the user's application roles. These roles may have been assigned thorough direct membership and nested groups, or were dynamically calculated.
Show Source
  • Application Role
    Title: Application Role
    An application role that's been granted to the user, either thorough direct membership, nested groups, or dynamic calculation.
Nested Schema : grants
Type: array
A list of the grants that are assigned to the user.
Show Source
Nested Schema : User Account
Type: object
Title: User Account
A complex attribute that represents an account that's been assigned to the user.
Show Source
Nested Schema : Application Role
Type: object
Title: Application Role
An application role that's been granted to the user, either thorough direct membership, nested groups, or dynamic calculation.
Show Source
Nested Schema : Grant
Type: object
Title: Grant
A grant that's been assigned to the user.
Show Source
  • The grant's URI.
  • The app identifier.
  • Allowed Values: [ "IMPORT_APPROLE_MEMBERS", "ADMINISTRATOR_TO_USER", "ADMINISTRATOR_TO_GROUP", "SERVICE_MANAGER_TO_USER", "ADMINISTRATOR_TO_APP", "SERVICE_MANAGER_TO_APP", "OPC_INFRA_TO_APP", "GROUP_MEMBERSHIP" ]

    Indicates how (or by what component) some app (or app entitlement) was granted.

    A customer or the UI should use only the values that start with `ADMINISTRATOR`:

    • `ADMINISTRATOR_TO_USER` is for a direct grant to a specific user.
    • `ADMINISTRATOR_TO_GROUP` is for a grant to a specific group, which results in indirect grants to users who are members of that group.
    • `ADMINISTRATOR_TO_APP` is for a grant to a specific app. The grantee (client) app gains access to the granted (server) app.
  • The grant identifier.
Nested Schema : x509 Certificate
Type: object
Title: x509 Certificate
A complex attribute that represents a certificate that's been issued to the user.
Show Source
Nested Schema : value
Type: object
The value of an X509 certificate.
Nested Schema : mobileExtended
Type: object
Show Source
Nested Schema : Identity Provider
Type: object
Title: Identity Provider
Additional Properties Allowed: true
The provider through which the current social user signed in.
Show Source
Nested Schema : Facebook Information
Type: object
Title: Facebook Information
Additional Properties Allowed: true
Facebook social user information.
Show Source
Example Response (application/json)
{
    "firstName":"Joe",
    "lastName":"Doe",
    "attributes":{
        "emails":[
            {
                "secondary":false,
                "verified":false,
                "type":"recovery",
                "value":"joe.doe@oracle.com",
                "primary":false
            }
        ],
        "displayName":"Joe Doe",
        "schemas":[
            "urn:ietf:params:scim:schemas:core:2.0:User",
            "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
            "urn:ietf:params:scim:schemas:idcs:extension:custom:User"
        ],
        "name":{
            "formatted":"Test Mobile User",
            "givenName":"Joe",
            "familyName":"Mobile User"
        },
        "id":"2e63bfeea6a14101b91256b4036dff94",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{
            "employeeNumber":"245562716"
        },
        "urn:ietf:params:scim:schemas:idcs:extension:custom:User":{
            "custom_attribute":"1076270704"
        }
    },
    "links":[
        {
            "rel":"canonical",
            "href":"/mobile/platform/users/joe"
        },
        {
            "rel":"self",
            "href":"/mobile/platform/users/joe"
        }
    ],
    "id":"295e450a-63f0-41fa-be43-cd2dbcb21598",
    "email":"joe@example.com",
    "username":"joe"
}

400 Response

The operation can't be performed.

Headers
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
Included when the error is caused by multiple issues.
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source
Example Response (application/json)
{
    "o:errorCode":"MOBILE-58060",
    "detail":"Unable to use API virtualization for calls without any mobile backend context.",
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Cannot call API",
    "o:errorPath":"/mobile/platform/users/joe",
    "o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000032b9d5, 0",
    "status":400
}

401 Response

The operation can't be performed due to one of the following reasons:

  • The user doesn't exist.
  • The password is incorrect.
  • The Authorization HTTP request header wasn't specified.
  • The user name doesn't match the user name in the Authorization HTTP request header.
Headers
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
Included when the error is caused by multiple issues.
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source
Example Response (application/json)
{
    "o:errorCode":"MOBILE-15209",
    "detail":"401 - Unauthorized",
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Unauthorized",
    "o:errorPath":"/mobile/platform/users/joe",
    "o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033b51c, 0",
    "status":401
}

403 Response

The operation can't be performed due to one of the following reasons:

  • The user doesn't have a role that's associated with the mobile backend.
  • The value of the Authorization HTTP request header that follows the Basic or 'Bearer' authentication scheme is either missing or invalid.

406 Response

The MIME media type isn't supported. Only application/json is supported. Either remove the Accept header or specify a media type that's supported.

Headers
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
Included when the error is caused by multiple issues.
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source
Example Response (application/json)
{
    "o:errorCode":"MOBILE-92516",
    "detail":"The MIME media type isn't supported, only application/json is supported. Either remove the Accept header or specify a media type that is supported.",
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Unsupported media type",
    "o:errorPath":"/mobile/platform/users/joe",
    "o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033ddba, 0",
    "status":406
}
Back to Top

Examples

The following example shows how to get the values of the firstName and lastName properties that are associated with the current IDCS user by submitting a GET request on the REST resource using cURL. These are some of the user object properties that are defined for the realm that the user is a member of. You can get properties for the current user only. The ~ (tilde) gets the user name for the current user from the Authorization header.

curl -i
-X GET 
-u mobile.user@example.invalid:password
-H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce"
https://fif.cloud.oracle.com/mobile/platform/users/~?fields=firstName,lastName

Example of Response Header

The following shows an example of the response header.

200 OK
Content-Type: application/json
Date: Mon, 28 Jan 2019 18:08:57 GMT

Example of Response Body for an IDCS User

The following example shows, in JSON format, the contents of the response body, which lists the requested properties (or all properties if no path parameters were specified):

{
  "firstName": "mobile",
  "lastName": "user"
}

Example of Response Body for a Social User

The following example shows, in JSON format, the contents of the response body when the current user is a social user:

{
  "username": "1 :623:165",
  "mobileExtended": {
      "identityProvider": {
          "facebook": {
              "accessToken":"CAAI...YZD"
          }
      }
  }
}
Back to Top