UserProvisioningRequest
Represents an individual provisioning request to create, update, or delete a single user account in a third-party service system (or another Salesforce organization).
A UserProvisioningRequest (UPR) record is created for each provisioning action 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 UPR objects. Provisioning actions include creating, updating, or deleting a user account.
Introduced in API version 31.0.
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()
- Type: string
- Properties: Create, Filter, Group, idLookup, Nillable, Sort, Update
- Description: The unique name of the connected app associated with the service provider.
- 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, supported values are: - Possible values:
- Required — Required — An approval process is enabled in the user provisioning setup for the associated connected app, but there is no response to the request yet.
- Not Required — Not Required — An approval process is not enabled in the user provisioning setup for the associated connected app.
- Approved — Approved
- Denied — Denied
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Description:
The 18-digit application ID for the connected app.
This is a relationship field.
-
Relationship name: ConnectedApp
-
Relationship type: relationship
-
Refers to: ConnectedApplication
- Type: string
- Properties: Create, Filter, Group, idLookup, Nillable, Sort, Update
- Description: The unique identifier for the user in the target system.
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 34.0
-
Description:
Salesforce ID of the user who manages the user specified in the
SalesforceUserIdfield. If an approval process is configured for the user provisioning request. this value allows the manager to approve the request.This is a relationship field.
-
Relationship name: Manager
-
Relationship type: relationship
-
Refers to: User
- Type: string
- Properties: Autonumber, Defaulted on create, Filter, idLookup, Sort
- Description: The unique name for this object.
-
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:
For example, when the User object field
isActiveis set tofalse, the UPR objectOperationfield value is set toDeactivate. -
Possible values:
- Create — Create
- Read — Read
- Update — Update
- Deactivate — Deactivate
- Activate — Activate
- Freeze — Freeze
- Unfreeze — Unfreeze
- Reconcile — Reconcile
- Linking — Linking
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 37.0
-
Description:
When a retry event is created, the failed UPR is cloned and resubmitted. This field contains a lookup to the failed UPR that was cloned to create the current record.
This is a relationship field.
-
Relationship name: Parent
-
Relationship type: relationship
-
Refers to: UserProvisioningRequest
- Type: int
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 37.0
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Description:
Salesforce ID of the user making the request.
This is a relationship field.
-
Relationship name: SalesforceUser
-
Relationship type: relationship
-
Refers to: User
-
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.
-
Type: picklist
-
Properties: Create, Filter, Group, Restricted picklist, Sort, Update
-
Description:
Status of this request. Supported values are:
The
Stategoes fromNewtoRequestedtoCompletedorFailed, unless a reconciliation process is occurring. For details about the reconciliation processStatevalue changes, see Usage.The
Stategoes fromFailedtoRetriedorManually Completedwhen troubleshooting UPR failures. For details about handling failures, see State Values for Managing Provisioning Failures. -
Possible values:
- New — New
- Requested — Requested
- Completed — Completed
- Failed — Failed
- Collecting — Collecting
- Collected — Collected
- Analyzing — Analyzing
- Analyzed — Analyzed
- Committing — Committing
- Retried — Retried
- Manually Completed — Manually Completed
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Description:
The ID value of the associated UserProvAccount object.
This is a relationship field.
-
Relationship name: UserProvAccount
-
Relationship type: relationship
-
Refers to: UserProvAccount
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 34.0
-
Description:
The ID value of the associated UserProvisioningConfig object.
This is a relationship field.
-
Relationship name: UserProvConfig
-
Relationship type: relationship
-
Refers to: UserProvisioningConfig
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 UPR 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 UPR 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.
— the transition to this value is not allowed.
— the transition to this value is allowed.
— only Salesforce can transition the Stateto this value.
New | Requested | Collecting | Collected | Analyzing | Analyzed | Committing | Completed | Failed | Retried | Manually Completed | |
|---|---|---|---|---|---|---|---|---|---|---|---|
New | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Requested | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Collecting | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Collected | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Analyzing | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Analyzed | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Committing | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Completed | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Failed | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Retried | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Manually Completed | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
The state value changes to Failed for several reasons, such as network outages, session timeouts, permissions issues, and record locks. The Failed state can transition to either Retried or Manually Completed to indicate what action was taken to address the failure. Actions can include correcting the root cause of the failure and requesting that the provisioning engine retry the UPR. Or, it can be completing the action against the target manually. Each UPR is an independent transaction and it’s possible the retry causes a failure with a different root cause. So it’s hard to distinguish failed events that you addressed from the ones that require more action.
If you tried to correct the cause of the failure and requested the provisioning engine to retry the UPR, you can mark the failed UPR Retried. Or, if the action against the target was completed manually, you can mark it Manually Completed.
When a retry event is created, the failed UPR is cloned, and resubmitted. The ParentID field contains a lookup to the failed UPR to use to clone the new UPR. The Retry Count field contains the number of retry attempts that were performed on a UPR. With the Retry Count field, you can add custom business logic like “Retry 5 times then stop and notify your admin.”
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version.
-
UserProvisioningRequestOwnerSharingRule: Introduced in API version 34.0.
-
UserProvisioningRequestShare: Introduced in API version 34.0.