FIM web service connector - how to pass the multivalued attribute value of reference type (Full Import)

Hello,

I have a web service, wich returns the user and it's related roles:

  [DataContract]

    public class SAP_AD_User

    {

        [DataMember]

        public Int32 UserId { get; set; }

        [DataMember]

        public string EmployeeNumber { get; set; }

        [DataMember]

        public string FirstName { get; set; }

        [DataMember]

        public string LastName { get; set; }

        [DataMember]

        public string FullName { get; set; }

        [DataMember]

        public string UserName { get; set; }

        [DataMember]

        public string JobTitle { get; set; }

        [DataMember]

        public string Company { get; set; }

        [DataMember]

        public IEnumerable<RoleID> SAPUserRoles { get; set; }

    }

    [DataContract]

    public class RoleID

    {

        [DataMember]

        public string FIMRoleId { get; set; }

    }

I have defined two attributes: User (with refSAPUserRoles Multi-Valued attribute of Reference type) and Role (with RoleId of String type), I've also designed the Full Import workflow for webservice MA. But how to assign a value to this multi-valued attribute in CreateValueChange element?


June 13th, 2013 5:54pm

What I've tried so far:

1. Added ForEach element to iterate over roles (If(roleList.RoleID, Enumerable.Empty(Of RoleID)()).ToArray()). But in this way only the last value is assigned. How to Add values to roleList?

2. Changed data type for SAPUserRoles:

[DataMember]

public String[] SAPUserRoles { get; set; }

Assigned values directly:

But then I get an error in Synchronization Service Manager:

Completed-doscovery-error (invalid-attribute-value)

In event viewer:

"System.InvalidCastException: Unable to cast object of type 'ns.ArrayOfstring' to type 'System.String'.

So how to cast those values properly?

Free Windows Admin Tool Kit Click here and download it now
June 17th, 2013 12:35pm

Any help on this issue?
June 18th, 2013 1:48pm

You should do one CreateAttributeChange and the in the ForEach loop multiple CreateValueChange.

Here is a screenshot from my wsconfig calling a SAP function that return users and role assignements (multivalue reference attribute).

Kind regards, David

Free Windows Admin Tool Kit Click here and download it now
June 21st, 2013 11:15pm

Thank You so much for the help. It works now :)
June 25th, 2013 2:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics