Remote proxy sync mappings
After you verify the remote proxy works, create a sync mapping to synchronize users:
Request
curl \
--header "Authorization: Bearer <access-token>" \
--header "Content-Type: application/json" \
--header "Accept-API-Version: resource=1.0" \
--request PUT \
"https://<originating-tenant-env-fqdn>/openidm/config/sync" \
--data '{
"mappings": [
{
"name": "remote_to_local_user_sync",
"source": "external/idm/<receiving-tenant-name>/managed/realm-name_user",
"target": "managed/realm-name_user",
"consentRequired": false,
"properties": [
{ "local": "userName", "remote": "userName" },
{ "local": "givenName", "remote": "givenName" },
{ "local": "sn", "remote": "sn" },
{ "local": "mail", "remote": "mail" },
{ "local": "password", "remote": "password" }
],
"policies": [
{ "situation": "ABSENT", "action": "CREATE" },
{ "situation": "FOUND", "action": "UPDATE" },
{ "situation": "CONFIRMED", "action": "UPDATE" }
],
"correlationQuery": [
{
"linkQualifier": "default",
"expressionTree": { "any": ["userName"] },
"type": "text/javascript",
"file": "ui/correlateTreeToQueryFilter.js"
}
]
}
]
}'
To verify the mapping, get the sync configuration from the mapping configuration:
Request
curl \
--header "Authorization: Bearer <access-token>" \
--header "Accept-API-Version: resource=1.0" \
--request GET \
"https://<originating-tenant-env-fqdn>/openidm/config/sync"
Run reconciliation
After you create and verify the mapping, run a reconciliation to synchronize data across environments:
Request
curl \
--header "Authorization: Bearer <access-token>" \
--header "Content-type: application/json" \
--header "Accept-API-Version: resource=1.0" \
--request POST \
"https://<originating-tenant-env-fqdn>/openidm/recon?_action=recon&mapping=remote_to_local_user_sync"
Response
{
"_id": "3d5a82e4-8c91-4d3a-a3c5-b38f8e5c7a21",
"state": "ACTIVE"
}