Oracle Mobile Cloud Service

Mobile User Management

Mobile User Management within MCS architecture

Oracle Mobile Cloud Service manages the users of your apps and their permissions through realms and roles. You use the Mobile User Management web interface in MCS to set up users, roles, and realms.

described in surrounding text

Note: Before you start, complete the Get Started with Mobile Development tutorial that is offered within Oracle Mobile Cloud Service on its Home page. That tutorial provides the mobile backend and sample app that you will use here.

In addition, you need to have the MobileEnvironment_MobileUserConfig and MobileEnvironment_MobileUserMgmt team member roles in MCS (in addition to the identity domain administrator role in Oracle Cloud) to complete this tutorial. See Assign MCS Team Member Roles in Using Oracle Mobile Cloud Service.

Let's quickly set up a realm, some roles, and a few users.

part 1Create a new user realm

A realm contains a set of users for mobile apps. Each mobile backend can use a single realm (and a realm can be used for multiple mobile backends). We'll create a realm specifically for our app.

  1. Click menu icon in the upper left corner of the page and select Applications > Mobile User Management.
  2. Click Realms.
  3. Click New Realm.
  4. Enter FiFRealm for the Realm Name and click Create.

part 2 Create mobile roles

A role is a set of permissions to access APIs and resources. We’ll create a couple of roles here and later assign those roles to users of our app.

  1. Click Roles.
  2. Click New Role, type Customer as the role name, and click Create.
  3. If you have not already created the Technician role, click New Role, type Technician as the role name, and click Create.

part 3 Create mobile users

  1. Click Users.
  2. Make sure that FiFRealm 1.0 is selected in the Realm dropdown.
  3. Click New User.
  4. Type Jim for the user name and fill in the remaining fields, including an email address where you can retrieve the generated password.

    The email address is used to establish uniqueness of users across all of the services in Oracle Cloud. Therefore, you must enter a different email address than what you have entered for other users (but one you have access to).

  5. In the Roles field, enter Technician.
  6. Click Create.
  7. Optionally, click New User again and create a new user and assign that user the Customer role.

    Again, if you complete this step, you'll need to use a different email address than you have used for other users.


part 4Associate the realm with your mobile backend

  1. In the menu on the left, click Mobile Backends. (If you have hidden the menu, click menu icon in the upper left corner of the page and select Applications > Mobile Backends.)
  2. Select the FiF_Customer mobile backend (or any other backend to associate with the realm) and click Open.
  3. Click Users.
  4. Click Change user realm.
  5. In the New Realm dropdown, select FiFRealm and click Change.

part 5Sign in to the sample app

  1. In your IDE, run the application.
  2. In the app running on the simulator or emulator, click Sign In, enter Jim as the user name, and enter the password that was sent to the email address you specified for that user.

    The login should be successful.

  3. Log out of the application.
  4. Once again, click Sign In, but this time enter Joe as the user name.

    The login should fail since this user has not been added to FiFRealm.


part 6Change the realm back

Since the other tutorials in this series are based on the same mobile backend, change the realm back to the default so that your team members can complete those tutorials without modifications to the instructions.

  1. In the menu on the left in MCS, click Mobile Backends. (If you have hidden the menu, click menu icon in the upper left corner of the page and select Applications > Mobile Backends.)
  2. Select your mobile backend and click Open.
  3. Click Users.
  4. Click Change Realm.
  5. In the New Realm dropdown, select Default 1.0 and click Change.

part 7Next steps