Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-10032: How can an administrator pull AD attributes not listed in the script help to use in provisioning script?

App Access Service ,   App Gateway Service ,  

14 March,18 at 10:49 PM

Applies to:

Any application that provisioning scripting is used



When an administrator writes a provisioning script, the attributes listed on the right hand side of the screen, under "Script Help" can be used. For example, to trace some attributes:


trace('DisplayName=' + destination.DisplayName);
trace('DisplayNameSource=' + source.DisplayName);
trace('DescriptionSource=' + source.Description);
trace('EmailSource=' + source.Email);



In the case that the needed attributes are not listed under Script Help, "Undefined". will be returned:

trace('DepartmentSource=' + source.Department);



Question:

How can AD attributes, not listed in the script help, be pulled from AD to use in provisioning script?



Answer:

One of the following can be used:


#1 -
getSourcePropertyByName
var departmentname = getSourcePropertyByName("department");
trace('department=' + departmentname[0]);
destination.Custom1 = departmentname[0];


In this case, department is being pulled from AD and being set for the Custom1 destination attribute.


#2 - source.Get
var departmentname = source.Get("department");
trace('department=' + departmentname);
destination.Custom1 = departmentname;


In this case, department is being pulled from AD and being set for the Custom1 destination attribute.


#3 - GetDsProperty
destination.PrimaryEmail = source.GetDsProperty("cn")[0] + "@" + GoogleDomain;

In this case, the CN is being pulled from AD and being set for the PrimaryEmail destination attribute.

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.