This tutorial will show you how to connect Salesforce as a target system for users from CzechIdM. We will use Salesforce connector which can be found on our Github.
Communication with Salesforce is via REST API.
Following operations are supported:
Create – create user Update – update user Get – get user's detail Get All – get all users
Delete operation is not supported, because Salesforce does not support deleting of user. User can be only deactivate via update method.
As a first thing we need to configure few things in Salesforce, otherwise the connection will not work. In Salesforce there must be created "Connected application", for more information follow official documentation
OAuth authetication must be allowed in connected app configuration.
Other important setting is field OAuth scope - select „Access and manage your data (api)“.
In the following picture, there is system configuration in IdM. Important fields are URL address - thats the address of Salesforce instance which will be conencted.
Values for fields client id and client secret are in Salesforce on Connected app detail.
Next fields are username, password and token. Token can be found in Salesforce.
Fields Access token validity and Get new token are for changing authentication behavior. In Salesforce there is session duration and the same time should be configured here. Thanks to that IdM will use the same token until the token is expired and then IdM obtain new one. In case connection is failing on invalid token exception you can check the second option, so IdM will get new token before each request. It's not recommended to use this option, use it carefully and only in case you encounter some auth error.
Next the process is same as for other systems. Generate Schema and configure attribute mapping.
Connector supports 34 basic attribute for schema generation. If you need to manage some other attributes, just add it manually to schema a map it. This can by applied even for custom Salesforce attributes.