Salesforce.com connector
This section describes how to enable provisioning / deprovisioning users in Salesforce.com using OpenIAM
The Salesforce.com connector provisions and deprovisions users in Salesforce.com (SFDC) over the Salesforce REST API. This page covers deploying it, registering it in OpenIAM, and configuring the managed system behind it.
Create user
Yes
POST /sobjects/User, immediately followed by a password call — see Passwords on newly created users
Update user
Yes
PATCH /sobjects/User/{id}
Delete user
Deactivates
Salesforce does not permit User records to be deleted. The connector sets IsActive to false, which is the same change Suspend makes
Suspend / resume user
Yes
Sets IsActive to false / true
Reset password
Yes
POST /sobjects/User/{id}/password
Search or look up a user
Yes
SOQL through /query/
Search roles
Yes
SOQL through /query/
Test connection
Yes
Requests an OAuth token
Login
No
Returns OPERATION_NOT_SUPPORTED
Update group
Yes
PATCH /sobjects/Profile/{id} — a "group" here is a Salesforce Profile
Delete group
Yes
DELETE /sobjects/Profile/{id}
Create group
No
Salesforce does not allow Profiles to be created this way. See the warning below
Use cases
Provisioning and deprovisioning Salesforce users — accounts, profiles, and permission flags — from OpenIAM.
Importing Salesforce users into OpenIAM for visibility and access review.
Managing password resets in Salesforce through OpenIAM.
Versions and compatibility
The connector calls the Salesforce REST API directly over HTTPS. It is not built against a particular Salesforce release, and it pins no API version of its own — the version is a managed system setting that the connector drops straight into the request path (/services/data/<version>/...).
Editions
Any Salesforce edition whose license includes API access
Interface
Salesforce REST API over HTTPS
API version
Whatever you set on the managed system
Authentication
OAuth 2.0, password grant — username, password + security token, client ID and client secret
Prerequisites
Connector host
This connector requires a Linux host.
Kubernetes: connectors are deployed automatically.
RPM distribution: follow the installation steps below.
Service account privileges
The connector authenticates as a single Salesforce user. That account needs:
A license that includes API access
Without it, every call is refused regardless of profile
A profile with API Enabled
The permission the REST API checks
Permission to administer users
To create, update and deactivate User records
API Enabled is a checkbox under Administrative Permissions on the profile assigned to the service account. In Salesforce Setup, open the profile, edit it, and select API Enabled. Follow Salesforce's own documentation for the current click path rather than a screenshot here, because the Setup UI changes between Salesforce releases.
Installing the connector
Kubernetes
In Kubernetes deployments this connector is deployed automatically as part of OpenIAM. No additional steps are required.
RPM install
Download the connector JAR and run it:
To follow the connector log:
Starting, stopping, and restarting
RPM (systemd)
systemctl start|stop|restart openiam-connector@salesforce-connector-rabbitmq
Kubernetes
kubectl rollout restart the connector deployment
Command-line parameters and properties
The connector is a Spring Boot application. Its defaults ship inside the jar, and you override them in either of two places:
An external property file, read at
${confpath}/conf/properties/salesforce-connector-rabbitmq.properties. The file is optional, andconfpathis itself a system property, set with-Dconfpath=/data/openiam/.Directly on the command line, as
-Darguments, which win over the file.
org.openiam.connector.queue
SALESFORCE_Connector_1_Request
Request queue. Must match the connector record in OpenIAM
org.openiam.connector.queueResponseName
SALESFORCE_Connector_1_Response
Response queue
org.openiam.salesforce.date.format
yyyy-MM-dd HH:mm:ss
Date format used with the Salesforce API
org.openiam.salesforce.token.expiresIn.minutes
15
How long the connector caches a Salesforce session token before re-authenticating. Align it with, or keep it below, your Salesforce org's session timeout
The Salesforce connection details themselves are not set here — they are managed system parameters, covered under Configuring the managed system.
Verifying the connector is running
In the Webconsole, open the managed system — the connection health check must appear green (this can take a few minutes after startup).
Click Test Connection — it must return success.
In the RabbitMQ management console, confirm the SALESFORCE_Connector_1_Request queue exists and has a consumer.
Check the connector output (tail -f salesforce.out in an RPM install) for startup errors.
Troubleshooting
Passwords on newly created users
The connector creates the user, then makes a second call to set the password. Two consequences are worth knowing before you build a policy map.
The password call runs after the account has already been created, and its result does not change the result OpenIAM sees. A create can therefore be reported as successful while the password step failed — if a newly provisioned user cannot sign in, check the connector log for the password call rather than assuming the account was not created.
After a password is assigned, the user's first sign-in through the Salesforce UI forces a reset. Salesforce also enforces a short delay — roughly five minutes — before a newly provisioned account can sign in.
Known errors
If the forced reset described above is canceled, setting a new password through the API can raise the following, even though the password is applied:
Test Connection fails immediately
Client ID, client secret or grant type is missing or wrong, or the password field has no security token appended
Check all four. The Password field holds the password and the token concatenated, with no separator
Test Connection fails after a password change
The security token is regenerated whenever the account's password changes
Append the new token to the new password
Every call fails with an API error
The service account's profile does not have API Enabled, or its license excludes API access
Enable API Enabled on the profile, or move the account to a license that includes API access
Requests fail against a version that used to work
The API version on the managed system has been retired by Salesforce
Set a currently supported API version
A group provisioning operation succeeds but nothing appears
The Profile does not exist in Salesforce
Create the Profile in Salesforce first — see the warning at the top of this page
See also: general connector troubleshooting and the connector error-code reference.
Registering the connector in OpenIAM
The connector must be registered within OpenIAM for it to be operational. This process defines the message queue used by the core OpenIAM services to communicate with the connector. To register the SFDC connector, log in to the Webconsole and follow the steps below.
Go to Provisioning → Connector.
If the Salesforce.com connector entry does not exist, click Create new connector from the side menu.
Complete the fields as shown below.
Connector Name
A descriptive name to identify this connector, for example Salesforce.com
Metadata Grouping
Select Connector type
Metadata Type Name
Select Salesforce.com connector — identifies the connector type internally
Connector Queue
Enter SALESFORCE_Connector_1. This is the queue name used for receiving messages
Configuring the managed system
Define a managed system in the Webconsole under Provisioning → Managed system. Before you do, collect two things from Salesforce.
Security token
The managed system's Password field takes the service account's password and its Salesforce security token concatenated into one string, with no separator.
Salesforce issues the token when the account is created and emails a new one whenever the account's password is changed. If you no longer have it, the account holder can reset it from Settings → My Personal Information → Reset My Security Token. See Salesforce's own help center for the current procedure.
Client ID and client secret
The connector authenticates with the OAuth 2.0 password grant, so it also needs the consumer key and consumer secret of a Salesforce connected app. A Salesforce administrator can read them from Setup → App Manager → the app → View → Manage Consumer Details.
In OpenIAM, the consumer key goes in Client ID and the consumer secret in Client Secret.

Managed system settings
Host URL
https://[tenant].salesforce.com, for example https://mycorp.salesforce.com
Login Id
The service account username
Password
Password and security token, entered as one string
Grand Type
password
Client ID
The connected app's consumer key
Client Secret
The connected app's consumer secret
API Version
A currently supported Salesforce API version, in Salesforce's own vNN.0 form
If the connection is successful, the connection health check appears green within a few minutes. If it fails it appears red — see Troubleshooting.
An example of a configured managed system:

Attribute mapping and policy map
Define a policy map, which determines how the connector populates attributes on the User object.
Go to Policy Map on the managed system created above.
Click Add and select Provision user from the dropdown.
Alias
User alias. Requires custom field. Max 8 characters
DefaultGroupNotificationFrequency
Set default via Groovy or custom field, type select
DigestFrequency
Set default via Groovy or custom field, type select
Maps to Primary email in OpenIAM. Must be unique
EmailEncodingKey
Default UTF-8. Requires Groovy or custom field
FirstName
N
User's first name. Required in OpenIAM but optional in Salesforce
IsActive
Determines active or disabled state in SFDC. Default scripts use OpenIAM Status
LanguageLocaleKey
Default en_US. Requires Groovy or custom field
LastName
User's last name
LocaleSidKey
Default en_US. Requires Groovy or custom field
Password
Y
See Passwords on newly created users. If the account is inactive the reset is sent as a link; if active, the password is updated directly
ProfileId
Requires custom field. Holds the ID of the Profile the user is added to
TimeZoneSidKey
Default America/New_York. Requires Groovy or custom field
Username
Principal. Defaults to primary email
UserPermissionsCallCenterAutoLogin
Default false. Requires Groovy or custom field
UserPermissionsMarketingUser
Required in SFDC. Default false, set via Groovy or custom field
UserPermissionsOfflineUser
Required in SFDC. Default false, set via Groovy or custom field
UserPermissionsWirelessUser
Required in SFDC. Default false, set via Groovy or custom field
All fields except FirstName, LastName, Email, Password and IsActive must be created as custom fields in the user template. Most can be given default values in Groovy scripts.
Reconciliation and synchronization
The connector supports user lookup, search and bulk import. Configure a synchronization against the managed system as described in Configuring synchronization.
Last updated
Was this helpful?