Exporting failed users

To export the list of failed users:

1. Send a request to the create user endpoint to create a user. The create user request returns a job ID. For example:

Endpoint: /cloudapi/restapi/user

Request body:

{
  "added": [{
      "organization": {
        "name": "sfo",
        "type": "Company"
      },
      "roles": [{
          "name": "PrimaveraP6Production"
        }
      ],
      "loginId": "JSMITH",
      "firstName": "JIM",
      "lastName": "SMITH",
      "emailAddress": "jim.smith@company.com",
      "userType": "EMP"
    }
  ]
}

For this example, assume the response is 40870.

2. Send a request to the job status endpoint to view the list of create user jobs which did not complete successful. Use the response from step 1 in the Request URL. The job status endpoint returns a json object containing the list of users. For example:

https://<server_URL>/cloudapi/restapi/users/status/40870

For this example, the response might be:

{
  "added": [{
      "status": "Active",
      "locked": false,
      "disabled": false,
      "createdBy": "ADMIN",
      "loginId": "JSMITH",
      "organization": {
        "associations": [],
        "displayName": "sfo",
        "id": "4",
        "inheritedPolicy": false,
        "isDeletable": false,
        "bidderCompany": false,
        "name": "sfo"
      },
      "emailAddress": "jim.smith@company.com",
      "id": "3475",
      "statusInfo": "User created, but Application Access failed",
      "pwdWarned": false,
      "loginAttemptsCtr": "0",
      "lastAction": "Created",
      "updatedDate": "2018-05-30T11:05:40",
      "firstName": "JIM",
      "lastName": "SMITH",
      "userType": "EMP",
      "createdDate": "2018-05-30T11:05:40",
      "pwdExpireDate": "2019-03-26T11:11:02",
      "pwdWarnDate": "2018-10-27T11:11:02",
      "provisionedDate": "2018-05-30T11:11:02",
      "pwdExpired": false,
      "pwdCantChange": false,
      "changePwdAtNextLogin": true
    }
  ],
  "modified": [],
  "deleted": [],
  "exception": "",
  "message": "",
  "updatedIdMap": {},
  "localizedException": true
}