Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • User Accounts:

    • Create: Ability to create new user accounts in SAP NetWeaver from EmpowerID.

    • Read: Ability to read and synchronize user account details from SAP NetWeaver to EmpowerID.

    • Update: Ability to update existing user account details in SAP NetWeaver from EmpowerID.

    • Delete: Ability to delete user accounts in SAP NetWeaver from EmpowerID.

  • Groups:

    • Create: Ability to create new groups in SAP NetWeaver from EmpowerID.

    • Read: Ability to read and synchronize group details from SAP NetWeaver to EmpowerID.

    • Update: Ability to update existing group details in SAP NetWeaver from EmpowerID.

    • Delete: Ability to delete groups in SAP NetWeaver from EmpowerID.


Helper Code and SPML Requests

The connector uses various helper functions and SPML requests for CRUD operations. Here is an overview of the key code components:

  • Helper Functions:

    • SerializeToString<T>: Serializes an object to an XML string.

    • GetConfigSettingValue: Retrieves configuration settings.

    • CreateSOAPBody: Creates a SOAP envelope for SPML requests.

    • ParseSearchResponse: Parses SPML search responses.

  • SPML Requests:

    • CreateSPMLSearchRequest: Creates an SPML search request.

    • CreateSPMLAddRequest: Creates an SPML add request.

    • CreateSPMLModifyRequest: Creates an SPML modify request.

    • CreateSPMLDeleteRequest: Creates an SPML delete request.

  • CRUD Operations:

    • PerformCRUD: Executes CRUD operations by sending SPML requests to SAP NetWeaver.

Example Code

Here is an example of a helper function to create an SPML search request:

Code Block
languagec#
Helper Code and SPML Requests
The connector uses various helper functions and SPML requests for CRUD operations. Here is an overview of the key code components:
•	Helper Functions:
o	SerializeToString<T>: Serializes an object to an XML string.
o	GetConfigSettingValue: Retrieves configuration settings.
o	CreateSOAPBody: Creates a SOAP envelope for SPML requests.
o	ParseSearchResponse: Parses SPML search responses.
•	SPML Requests:
o	CreateSPMLSearchRequest: Creates an SPML search request.
o	CreateSPMLAddRequest: Creates an SPML add request.
o	CreateSPMLModifyRequest: Creates an SPML modify request.
o	CreateSPMLDeleteRequest: Creates an SPML delete request.
•	CRUD Operations:
o	PerformCRUD: Executes CRUD operations by sending SPML requests to SAP NetWeaver.
Example Code
Here is an example of a helper function to create an SPML search request:
public static SearchRequest CreateSPMLSearchRequest(string id, string primaryKey, List<string> attributes)
{
    Identifier identifier = new Identifier();
    identifier.Item = id;
    Filter filter = new Filter();

    FilterSet filterSet = new FilterSet();

    List<string> primaryKeys = new List<string>();
    if (string.IsNullOrWhiteSpace(primaryKey))
        primaryKeys.Add("logonname");
    else
    {
        if (primaryKey.Contains(' '))
            primaryKeys.AddRange(primaryKey.Replace(" ", "").Split(' '));
        else
            primaryKeys.Add(primaryKey.Trim());
    }

    object[] obj = new object[primaryKeys.Count];
    ItemsChoiceType[] itemsChoiceTypeArray = new ItemsChoiceType[primaryKeys.Count];
    int pkIndex = 0;
    foreach (string pk in primaryKeys)
    {
        AttributeDescription attrDesc = new AttributeDescription();
        attrDesc.name = pk;
        obj[pkIndex] = attrDesc;
        itemsChoiceTypeArray[pkIndex] = ItemsChoiceType.present;
        pkIndex++;
    }

    filterSet.Items = obj;
    filterSet.ItemsElementName = itemsChoiceTypeArray;
    filter.Item = filterSet;
    filter.ItemElementName = ItemChoiceType.and;

    AttributeDescriptions[] attrs = new AttributeDescriptions[1];
    if (attributes != null && attributes.Count > 0)
    {
        AttributeDescription[] attributeField = new AttributeDescription[attributes.Count];
        int index = 0;
        foreach (string attribute in attributes)
        {
            AttributeDescription attributeDescription = new AttributeDescription();
            attributeDescription.name = attribute;
            attributeField[index] = attributeDescription;
            index++;
        }
        AttributeDescriptions attributeDescriptions = new AttributeDescriptions();
        attributeDescriptions.attribute = attributeField;
        attrs[0] = attributeDescriptions;
    }

    SearchRequest searchRequest = new SearchRequest();
    searchRequest.searchBase = identifier;
    searchRequest.filter = filter;
    searchRequest.attributes = attrs;

    return searchRequest;
}

Conclusion

The EmpowerID SAP NetWeaver connector provides a powerful and flexible solution for integrating SAP NetWeaver with the EmpowerID IGA system. By following the configuration steps and utilizing the provided helper functions and SPML requests, organizations can ensure seamless synchronization and management of identity data across both platforms.