Setting a New Password for a Cloud User

You can set a new password for a user of a Microsoft account by following these steps:

1. Obtain the APS ID and Display Name of the Cloud User

Obtain the APS ID of the CloudUser APS resource that belongs to the cloud user. To do this, use this request:

Copy
GET https://BRAND_DOMAIN/aps/2/resources/?implementing(APS_TYPE_ID_OF_CLOUD_USER_RESOURCE),eq(login,UPN_OF_CLOUD_USER)

From the response that you receive, write down the values of the aps.id and display_name parameters.

Note: To prepare the APS type ID of an APS resource, use the instructions in Obtaining APS Type IDs.

Example

HTTP Request

Copy
GET https://example.com/aps/2/resources/?implementing(http://www.parallels.com/Office365/CloudUser/2),eq(login,admin@example.onmicrosoft.com)

HTTP Response

Copy
[
  {
    "is_readonly": false,
    "has_licenses": false,
    "role": "Company Administrator",
    "aps": {
      "modified": "2020-04-29T11:12:54Z",
      "id": "439c76cb-cc42-413e-b5ac-a5dcb512341c",
      "subscription": "feada103-2a18-4d08-bf6c-2c9664f2cbd3",
      "type": "http://www.parallels.com/Office365/CloudUser/2.3",
      "status": "aps:ready",
      "revision": 2
    },
    "user_id": "b6c92e21-50a3-4ec0-8a5b-077ef3a44e65",
    "usage_location": "",
    "is_linked_with_core_user": false,
    "display_name": "John Smith",
    "login": "admin@example.onmicrosoft.com",
    "status": 2
  }
]

2. Split the Display Name into the First Name and Last Name

Split the display name of the cloud user into the first name and last name. Write them down. For example, split "John Smith" into "John" and "Smith".

3. Obtain the APS ID of a Microsoft 365 Application Instance

Obtain the APS ID of a Microsoft 365 application instance. To do this, use this request:

Copy
GET https://BRAND_DOMAIN/aps/2/resources/?implementing(APS_TYPE_ID_OF_APPLICATION_INSTANCE_RESOURCE)

From the response that you receive, obtain and write down the value of the aps.id parameter of a Microsoft 365 application instance (you can choose any application instance from the response).

Note: To prepare the APS type ID of an APS resource, use the instructions in Obtaining APS Type IDs.

Example

HTTP Request

Copy
GET https://example.com/aps/2/resources/?implementing(http://www.parallels.com/Office365/Office365app/3)

HTTP Response

Copy
[
  {
    "is_tip_account": "sure",
    "driversEnvironment": "PRODUCTION",
    "domain_verification_mode": 1,
    "pba_api_url": "https://192.168.1.2:5224/RPC2",
    "autolink_domains": false,
    "instance_name": "M365 1: Microsoft 365 Instance",
    "aps": {
      "modified": "2020-04-29T10:08:33Z",
      "id": "cfffeadf-ec58-4f64-a475-3c5ef3525135",
      "type": "http://www.parallels.com/Office365/Office365app/3.1",
      "status": "aps:ready",
      "revision": 57
    },
    "packageRelease": "295",
    "homepage_url": "http://office365.microsoft.com",
    "reseller_tenant_id": "4543e0ea-4462-4338-a01c-ee0d1019e553",
    "base_domain": "onmicrosoft.com",
    "packageVersion": "20.1",
    "software_licenses_product_types": [
      "SoftwarePerpetual",
      "SoftwareSubscriptions"
    ],
    "invitation_url": "https://partnercenter.microsoft.com/commerce/indirectresellers/relationshiprequest/4543e0ea-4462-4338-a01c-ee0d1019e553",
    "client_id": "528e1585-0d2d-4607-a11a-beee507f7ee8",
    "message_types": {
      "assign_service": 48,
      "activate_tenant": 50,
      "serviceProviderError": 51,
      "usersSkipped": 52,
      "pre_assign_service": 49,
      "customerAgreementRequired": 53
    },
    "show_service_plans": false,
    "account_disabling_behavior": "tip",
    "allow_change_settings": true,
    "software_licenses_target_segments": [
      "commercial",
      "education",
      "government",
      "nonprofit"
    ],
    "partner_onboarding_website_url": "https://consent.ingrammicrocloud.com/",
    "portal_url": "https://portal.office.com",
    "pba_user_name": "admin",
    "poa_api_url": "http://192.168.1.1:8440/RPC2"
  }
]

4. Generate a New Password and Check Its Complexity

Generate a password that meets the following complexity requirements:

  • Its length must be between 8 and 16 characters.
  • It must contain characters from at least three of these four categories: uppercase Latin letters, lowercase Latin letters, digits, and special characters (spaces are not allowed).
  • It must not contain the user name or display name of the cloud user it belongs to.

When generating a password, avoid using dictionary words, personal information, or keyboard sequences.

Check whether the generated password meets the complexity requirements above by using this request:

Copy
POST https://BRAND_DOMAIN/aps/2/resources/APS_ID_OF_APPLICATION_INSTANCE/validate_password

{
    "login": "UPN_OF_CLOUD_USER",
    "password": "NEW_PASSWORD_OF_CLOUD_USER",
    "first_name": "FIRST_NAME_OF_CLOUD_USER",
    "last_name": "LAST_NAME_OF_CLOUD_USER"
}

If this new password does not pass this check, generate a more complex password.

Important: Checking the complexity of a password is a custom operation. The user whose key and secret you use to access the APS REST API must have http://www.parallels.com/Office365/Office365app and POST in its list of allowed operations.

Note: To learn about the password complexity requirements used in CloudBlue Commerce, see the Operations Provider's Guide.

Example

HTTP Request

Copy
POST https://example.com/aps/2/resources/ed655cde-4d83-4fdc-a45d-a911a86929cb/validate_password

{
    "login": "admin@example.onmicrosoft.com",
    "password": "F2CJV6gsK",
    "first_name": "John",
    "last_name": "Smith"
}

HTTP Response

Copy
{
  "is_valid": true
}

5. Set the Validated Password for the Cloud User

Set the new password for the cloud user. To do this, use this request:

Copy
POST https://BRAND_DOMAIN/aps/2/resources/APS_ID_OF_CLOUD_USER/change_password

{
    "newPassword": "NEW_PASSWORD"
}

Note: If a password is successfully changed, HTTP status code 200 is returned.

Important: Setting a new password is a custom operation. The user whose key and secret you use to access the APS REST API must have http://www.parallels.com/Office365/CloudUser and POST in its list of allowed operations.

Example

HTTP Request

Copy
POST https://example.com/aps/2/resources/439c76cb-cc42-413e-b5ac-a5dcb512341c/change_password

{
    "newPassword": "F2CJV6gsK"
}

HTTP Response

N/A