Skip to content

Directory extension support#42

Open
NemoVDEynde wants to merge 10 commits into
Evolveum:masterfrom
NemoVDEynde:master
Open

Directory extension support#42
NemoVDEynde wants to merge 10 commits into
Evolveum:masterfrom
NemoVDEynde:master

Conversation

@NemoVDEynde

Copy link
Copy Markdown

Added support for entra directory extensions. The extensions need to be declared in the config separated by ";", only provide the actual names as "extension_{client_id}" prefix will be automatically added.

// directory extensions
for (String ext : directoryExtensionAttributeList(getConfiguration())){
userObjClassBuilder.addAttributeInfo(new AttributeInfoBuilder(ext)
.setRequired(false).setType(String.class).setCreateable(false).setUpdateable(true).setReadable(true).build());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would really not want to specify this as a general assumption for all extension attributes. I'm no expert in MS Entra, but looking at this topic, it seems that there are also other supported data types than "String". Also, they can be creatable, rather than just updatable (and other flags like multiplicity can play a role as well).

Comment thread pom.xml Outdated
<groupId>com.evolveum.polygon</groupId>
<artifactId>connector-msgraph</artifactId>
<version>1.2.1.0-SNAPSHOT</version>
<version>1.2.1.4-SNAPSHOT</version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not update the "versioning" of the connector.

@matusmacik

Copy link
Copy Markdown
Contributor

Thank you for your contribution. This feature could certainly be interesting in the Entra connector, yet the implementation limits it to only the "User" object class (which could be potentially documented as a limitation). The more problematic part is the general assumption, which I pointed out in the following comment. In this case, more information about the attribute schema might be needed. We do not have a way to specify complex parameters in the configuration (yet), so the possibilities might be a naming convention or a path to a file containing the schema in a machine-readable format (which could be parsed by the connector).

@NemoVDEynde

Copy link
Copy Markdown
Author

Thank you for your contribution. This feature could certainly be interesting in the Entra connector, yet the implementation limits it to only the "User" object class (which could be potentially documented as a limitation). The more problematic part is the general assumption, which I pointed out in the following comment. In this case, more information about the attribute schema might be needed. We do not have a way to specify complex parameters in the configuration (yet), so the possibilities might be a naming convention or a path to a file containing the schema in a machine-readable format (which could be parsed by the connector).

Hi thanks for your feedback, this is a feature needed by a project I am doing which I thought others might find useful as well. I am working on the feedback you have given, and am adding support for all different types. This documentation page states the following types:

  • Binary - Attribute contains binary data.
  • Boolean - Attribute contains a True or False value.
  • DateTime - Attribute contains a date string.
  • Integer - Attribute contains an integer.
  • Reference - Attribute contains an ID that references a value stored in another table in the target application.
  • String - Attribute contains a text string.
    These are pretty self explanatory except for the Binary one, i am not quite sure as to which type in java to use. Is midpoint able to handle binary values in some way? Or should I pass them as String?

@matusmacik

Copy link
Copy Markdown
Contributor

Thank you, that sounds great! For the binary types, an "array of bytes" as for the "type" definition should be used. Here is an example in the case of the "photo" attribute.

Nemo Van den Eynde added 7 commits March 25, 2026 08:41
…ensions. Datetime is handled as String because other time objects seem to be handled like that. reference is also handled as a string as it is an id, this id can be used with a simulated reference in midpoint if needed.
…nsions. Updated update method to fetch old state of multivalued extension attributes.
@NemoVDEynde

Copy link
Copy Markdown
Author

Hi
I have expanded the functionality for directory extensions to support multiple types single and multi value. I have also added a mandatory flag as the entra schema definition supports it.
Config is now done in a multivalued element with formatted text "Extension_{appId}_name;type;multivalued;required". The app Id has been added because it's possible to access attributes from different apps. the extension prefix is not required the connector will check for it. Multivalued and and required just need true/false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants