PhenixID

PSD1139 – MS Dynamics CRM Actions for Identity Provisioning

Fact

  • PhenixID Identity Provisioning 5.0.0 or later

System Requirements

  • Account in Microsoft Dynamics CRM

Situation

Use PhenixID Identity Provisioning to setup automatic user provisioning from Microsoft Dynamics CRM.

Solution

This document will show the steps that are necessary to configure Identity Provisioning to automatically read information from Microsoft Dynamics CRM.

Download

 

Download the zip file:

 

MSDynamicsCRMActionPackage.zip

 

For instruction of how to install the action package, read PSD1149.

 

Common Action Parameters

Multiple actions are included in the package, but they all have some parameters in common.

Parameter

Description

Example

Token URL

[Optional] The URL for requesting a token. Default is the value in global parameter MSDynamicsCRMTokenURL. Supports GLOBAL().

This parameter is set to optional, but if the parameter is blank there must be a valid value in the global parameter MSDynamicsCRMTokenURL.

https://login.microsoftonline.com/41008518-7777-488e-8b69-c3bdd728a123/oauth2/v2.0/token

Scope

[Optional] The scope for Dynamics CRM. Default is the value in global parameter MSDynamicsCRMScope. Supports GLOBAL().

This parameter is set to optional, but if the parameter is blank there must be a valid value in the global parameter MSDynamicsCRMScope.

https://test.crm4.dynamics.com/.default

Client ID

[Optional] The client ID for connecting to Dynamics CRM. The format for the client ID is a GUID. Default is the value in global parameter MSDynamicsCRMClientID. Supports GLOBAL().

This parameter is set to optional, but if the parameter is blank there must be a valid value in the global parameter MSDynamicsCRMClientID.

12345678-9abc-def1-2345-67890abcdef

Client Secret

The client secret for connecting to Dynamics CRM. Default is the value in global parameter MSDynamicsCRMClientSecret. Supports GLOBAL().

This parameter is set to optional, but if the parameter is blank there must be a valid value in the global parameter MSDynamicsCRMClientSecret.

hsdks84(gs@HG87nd[PrD4aaa29DWcr3

Endpoint URL

The endpoint URL for Dynamics CRM. Default is the value in global parameter MSDynamicsCRMEndpointURL. Supports GLOBAL().

This parameter is set to optional, but if the parameter is blank there must be a valid value in the global parameter MSDynamicsCRMEndpointURL.

https://test.crm4.dynamics.com/api/data/v9.1/

Entity Types and Queries

With our read actions you can fetch any type of entity from MS Dynamics CRM. To read about the available entity types and their attributes read the Web API EntityType Reference.

To reduce the selection of objects and attributes, the call to the web service can be made using a query. Read more about how to write a query in the guide Web API Query Data Sample.

Actions

MS Dynamics CRM Get Objects

Version 1.6

Search for objects from MS Dynamics CRM and create session objects for the result.

Parameter

Description

Example

Paging Size

[Optional] The number of objects to fetch in each request.

Default is value in global parameter MSDynamicsCRMPagingSize, or 5000 if the parameter is not configured.

Supports GLOBAL().

2000

Entitytype and Query

[Mandatory] The entitytype to fetch from Dynamics CRM, and optional query.

contacts?$select=fullname,jobtitle

Attributes

[Optional] Comma separated list of the attributes to create session attributes for. To rename the attributes, use | to map the attribute name, e.g. DynamicsCRMAttribute|myAttributeName.

For a list of available attributes, read the Web API EntityType Reference linked above.

Default: Session attributes will be created for all attributes in the web service response. The web service sometimes responds with more attributes than entered in the query.

fullname|Name,jobtitle|Title

Attributes with JSON

[Optional] Comma separated list of the attributes where the value should not be read as string values. If the attribute contains a JSON object, the whole JSON object will be in the session attribute value.

enabled

Max No of Results

[Optional] The max number of results to fetch from Dynamics CRM.

Default: 5000.

1000

Keep Existing Session Objects

[Optional] If any existing Session Objects should be kept (true) or removed (false).

Default value = true.

false

MS Dynamics CRM Add to Object by Search

Version 1.8

Search for one object from MS Dynamics CRM and add its attributes to the current session object.

Parameter

Description

Example

Token Valid Time

[Optional] The time, in minutes, before a new access token must be requested.

Default: 60.

30

Paging Size

[Optional] The number of objects to fetch in each request.

Default is value in global parameter MSDynamicsCRMPagingSize, or 5000 if the parameter is not configured.

Supports GLOBAL().

2000

Entitytype and Query

[Mandatory] The entitytype to fetch from Dynamics CRM, and the query to select one specific object.

Supports GLOBAL() and SESSION().

contacts?$select=fullname,jobtitle&$filter=contains(emailaddress1,’SESSION(email)’)

Attributes

[Optional] Comma separated list of the attributes to create session attributes for. To rename the attributes, use | to map the attribute name, e.g. DynamicsCRMAttribute|myAttributeName.

For attributes in sub json object, use [SubObjectName]DynamicsCRMAttribute.

For a list of available attributes, read the Web API EntityType Reference linked above.

Default: Session attributes will be created for all attributes in the web service response. The web service sometimes responds with more attributes than entered in the query.

fullname|Name,jobtitle|Title

Attributes with JSON

[Optional] Comma separated list of the attributes where the value should not be read as string values.

If the attribute contains a JSON object, the whole JSON object will be in the session attribute value.

status

Add Multiple Matches to Multivalue Attribute

[Optional] If the search matches multiple objects, concatenate the values from the objects into multivalue attributes (true) or make attributes from only the first object in the result (false).

Default: false.

true

Error Attribute Name

[Optional] The name of the error attribute that will be created if any error occurs.

Default: errorMessage.

dynamicsError

MS Dynamics CRM Add to Object by ID

Version 1.6

Use the object’s ID to fetch one object from MS Dynamics CRM and add its attributes to the current session object.

Parameter

Description

Example

Token Valid Time

[Optional] The time, in minutes, before a new access token must be requested.

Default: 60.

30

Entitytype and ID

[Mandatory] The entitytype and ID for the object to fetch from Dynamics CRM. Add query to specify the attributes to fetch.

Supports GLOBAL() and SESSION().

contacts(SESSION(id))?$select=fullname,jobtitle

Attributes

[Optional] Comma separated list of the attributes to create session attributes for. To rename the attributes, use | to map the attribute name, e.g. DynamicsCRMAttribute|myAttributeName.

For a list of available attributes, read the Web API EntityType Reference linked above.

Default: Session attributes will be created for all attributes in the web service response. The web service sometimes responds with more attributes than entered in the query.

fullname|Name,jobtitle|Title

Attributes with JSON

[Optional] Comma separated list of the attributes where the value should not be read as string values. If the attribute contains a JSON object, the whole JSON object will be in the session attribute value.

statusCode

Error Attribute Name

[Optional] The name of the error attribute that will be created if any error occurs.

Default: errorMessage.

dynamicsError

MS Dynamics CRM Update Objects

Version 1.3

Update an object in MS Dynamics CRM with attributes from the current session object.

Parameter

Description

Example

Token Valid Time

[Optional] The time, in minutes, before a new access token must be requested.

Default: 60.

30

Entitytype and ID

[Mandatory] The entitytype and the ID for the object to update in Dynamics CRM. Ex: contacts(SESSION(contactid)).

Supports GLOBAL() and SESSION().

contacts(SESSION(contactid))

Body

[Mandatory] The body, in JSON format, to send to Dynamics CRM.

Supports GLOBAL() and SESSION().

 {
“givenname”:”SESSION(givenname)”,
“emailaddress1″:”SESSION(mail)”
}

Error Attribute Name

[Optional] The name of the error attribute that will be created if any error occurs.

Default: errorMessage.

dynamicsError


DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.

PhenixID - support.phenixid.se