Newer Version Available

This content describes an older version of this product. View Latest

UserProvisioningRequest

The UserProvisioningRequest standard object represents an individual provisioning request for a single user.

Represents an individual provisioning request to create, update or delete a user account in a third-party service system (or another Salesforce organization). A UserProvisioningRequest object is created for each provisioning action (such as creating, updating or deleting a user account) for each user, and for each connected app available to the user. For example, if a user has two connected apps, and a provisioning request is sent to two different services to create an account for the user, Salesforce creates two UserProvisioningRequest objects.

This object is available in API version 33.0 and later.

Supported Calls

create()delete()describeSObjects()getDeleted()getUpdated()query()retrieve()undelete()update()upsert()

Fields

Field Details
AppName
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The unique name of the connected app associated with the service provider.
ApprovalStatus
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
The status of the approval for the current request. If the user provisioning setup for the connected app does not have an approval process enabled, the status is Not Required. If an approval process is enabled, supportedvalues are:
  • Required— An approval process is enabled in the user provisioning configuration for the associated connected app, but there is no response to the request yet.
  • Not Required— An approval process is not enabled in the user provisioning configuration for the associated connected app.
  • Approved
  • Denied
ConnectedAppId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description

The eighteen digit application ID for the connected app.

ExternalUserId
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The unique identifier for the user in the target system.
ManagerId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description

Salesforce ID of the user who manages the user specified in the SalesforceUserId field. If an approval process is configured for the user provisioning request. this value allows the manager to approve the request. Available in API version 34.0 and later.

Name
Type
string
Properties
Autonumber, Defaulted on create, Filter, idLookup, Sort
Description
The unique name for this object.
Operation
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
The Apex method called by the trigger associated with the provisioning request (typically a change to the User object). Supported values are:
  • Create
  • Read
  • Update
  • Deactivate
  • Activate
  • Freeze
  • Unfreeze
  • Reconcile
  • Linking

For example, when the User object field isActive is set to false, the UserProvisioningRequest object Operation field value is set to Deactivate.

OwnerId
Type
reference
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Salesforce ID of the Group or User who owns this object.
SalesforceUserId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Salesforce ID of the user making the request.
ScheduleDate
Type
dateTime
Properties
Create, Filter, Nillable, Sort, Update
Description
When to send this request to the service provider.

Scheduling is not implemented yet. Currently, provisioning changes are queued immediately to be sent to the service provider.

Note

State
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
Status of this request. Supported values are:
  • New
  • Requested
  • Completed
  • Failed
  • Collecting
  • Collected
  • Analyzing
  • Analyzed
  • Committing
The State goes from New to Requested to Completed or Failed, unless a reconciliation process is occurring. For details about the reconciliation process State value changes, see Usage.
UserProvAccountId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The ID value of the associated UserProvAccount object.
UserProvConfigId
Type
reference
Properties
Create, Filter, Group, Nillable, Sort, Update
Description

The ID value of the associated UserProvisioningConfig object. Available in API version 34.0 and later.

Usage

The State value changes during a reconciliation process (Operation = Reconcile) to gather and compare users on the third-party system to Salesforce users. Typically, when a UserProvisioningRequest entry is first created, it has a State value of New. When a collection process is triggered, the State transitions to Collecting until that process is finished and the State is Collected. When an analyze process is triggered, the State transitions to Analyzing until that process is finished and the State is Analyzed. If a process commits the request, the State then transitions to Committing, and the properties move from the UserProvAccountStaging object to the UserProvAccount object. When those properties are saved in the UserProvAccount object, the State transitions to Completed.

However, the State does not necessarily start at New. For example, UserProvAccountStaging entries can be inserted programmatically. If a process is initiated that triggers linking these rows to accounts on the third-party service, a UserProvisioningRequest entry could start with the Analyzing State.

Also, the State cannot go backwards from an active task. For example, a successful Analyzing State must progress to Analyzed; unless the active process fails, and then the State must change to Failed. Certain State transitions cannot be made programmatically and must be triggered by Salesforce.

The following table shows the State transitions that can occur for each State value. Each row corresponds to a current State value and each column corresponds to a new State after a potential transition.
  • no — the transition to this value is not allowed.
  • yes — the transition to this value is allowed.
  • Salesforce only — only Salesforce can transition the State to this value.
New Requested Collecting Collected Analyzing Analyzed Committing Completed Failed
New yes Salesforce only yes yes yes yes yes yes yes
Requested no yes Salesforce only Salesforce only Salesforce only Salesforce only Salesforce only Salesforce only Salesforce only
Collecting no no yes Salesforce only Salesforce only Salesforce only Salesforce only Salesforce only Salesforce only
Collected no no no yes yes yes yes yes yes
Analyzing no no no Salesforce only yes Salesforce only Salesforce only Salesforce only Salesforce only
Analyzed no no no no no yes yes yes yes
Committing no no no no no Salesforce only yes Salesforce only Salesforce only
Completed no no no no no no no yes no
Failed no no no no no no no no yes