|
| 1 | +<?xml version="1.0" ?> |
| 2 | +<lsc xmlns="http://lsc-project.org/XSD/lsc-core-2.1.xsd" |
| 3 | + xmlns:msgraphapi="http://lsc-project.org/XSD/lsc-microsoft-graph-api-plugin-1.0.xsd" revision="0"> |
| 4 | + <connections> |
| 5 | + <ldapConnection> |
| 6 | + <name>openldap</name> |
| 7 | + <url>ldap://localhost/dc=example,dc=org</url> |
| 8 | + <username>cn=admin,dc=example,dc=org</username> |
| 9 | + <password>admin</password> |
| 10 | + <authentication>SIMPLE</authentication> |
| 11 | + <referral>THROW</referral> |
| 12 | + <derefAliases>NEVER</derefAliases> |
| 13 | + <version>VERSION_3</version> |
| 14 | + <pageSize>-1</pageSize> |
| 15 | + <factory>com.sun.jndi.ldap.LdapCtxFactory</factory> |
| 16 | + <tlsActivated>false</tlsActivated> |
| 17 | + <saslMutualAuthentication>false</saslMutualAuthentication> |
| 18 | + </ldapConnection> |
| 19 | + <pluginConnection> |
| 20 | + <name>msgraphapi</name> |
| 21 | + <url></url> |
| 22 | + <username></username> |
| 23 | + <password></password> |
| 24 | + <msgraphapi:msGraphApiConnectionSettings> |
| 25 | + <msgraphapi:clientId>${MS_GRAPH_API_CLIENT_ID}</msgraphapi:clientId> |
| 26 | + <msgraphapi:clientSecret>${MS_GRAPH_API_CLIENT_SECRET}</msgraphapi:clientSecret> |
| 27 | + <msgraphapi:tenant>${MS_GRAPH_API_TENANT}</msgraphapi:tenant> |
| 28 | + </msgraphapi:msGraphApiConnectionSettings> |
| 29 | + </pluginConnection> |
| 30 | + </connections> |
| 31 | + <audits/> |
| 32 | + <tasks> |
| 33 | + <task> |
| 34 | + <name>users</name> |
| 35 | + <bean>org.lsc.beans.SimpleBean</bean> |
| 36 | + <pluginSourceService implementationClass="org.lsc.plugins.connectors.msgraphapi.MsGraphApiUsersSrcService"> |
| 37 | + <name>msgraphapisrc</name> |
| 38 | + <connection reference="msgraphapi"/> |
| 39 | + <msgraphapi:msGraphApiUsersService> |
| 40 | + <name>msgraphapi-users-service-src</name> |
| 41 | + <connection reference="msgraphapi"/> |
| 42 | + <msgraphapi:filter>startsWith(mail, 'a')</msgraphapi:filter> |
| 43 | + <msgraphapi:pivot>userPrincipalName</msgraphapi:pivot> |
| 44 | + <msgraphapi:pageSize>999</msgraphapi:pageSize> |
| 45 | + <msgraphapi:select>userPrincipalName,mail,displayName</msgraphapi:select> |
| 46 | + </msgraphapi:msGraphApiUsersService> |
| 47 | + </pluginSourceService> |
| 48 | + <ldapDestinationService> |
| 49 | + <name>ldapdst</name> |
| 50 | + <connection reference="openldap"/> |
| 51 | + <baseDn>ou=users,dc=example,dc=org</baseDn> |
| 52 | + <pivotAttributes> |
| 53 | + <string>uid</string> |
| 54 | + </pivotAttributes> |
| 55 | + <fetchedAttributes> |
| 56 | + <string>objectClass</string> |
| 57 | + <string>uid</string> |
| 58 | + <string>cn</string> |
| 59 | + <string>mail</string> |
| 60 | + <string>sn</string> |
| 61 | + </fetchedAttributes> |
| 62 | + <getAllFilter>(&(objectClass=person)(uid=*))</getAllFilter> |
| 63 | + <getOneFilter>(&(objectClass=person)(uid={userPrincipalName}))</getOneFilter> |
| 64 | + </ldapDestinationService> |
| 65 | + <propertiesBasedSyncOptions> |
| 66 | + <mainIdentifier>"uid=" + javax.naming.ldap.Rdn.escapeValue(srcBean.getDatasetFirstValueById('userPrincipalName')) + ",ou=users,dc=example,dc=org";</mainIdentifier> |
| 67 | + <defaultDelimiter>;</defaultDelimiter> |
| 68 | + <defaultPolicy>FORCE</defaultPolicy> |
| 69 | + <conditions> |
| 70 | + <create>true</create> |
| 71 | + <update>true</update> |
| 72 | + <delete>true</delete> |
| 73 | + <changeId>true</changeId> |
| 74 | + </conditions> |
| 75 | + <dataset> |
| 76 | + <name>objectClass</name> |
| 77 | + <forceValues> |
| 78 | + <string>"inetOrgPerson"</string> |
| 79 | + </forceValues> |
| 80 | + </dataset> |
| 81 | + <dataset> |
| 82 | + <name>cn</name> |
| 83 | + <forceValues> |
| 84 | + <string>srcBean.getDatasetFirstValueById("displayName")</string> |
| 85 | + </forceValues> |
| 86 | + </dataset> |
| 87 | + <dataset> |
| 88 | + <name>uid</name> |
| 89 | + <forceValues> |
| 90 | + <string>srcBean.getDatasetFirstValueById("userPrincipalName")</string> |
| 91 | + </forceValues> |
| 92 | + </dataset> |
| 93 | + <dataset> |
| 94 | + <name>sn</name> |
| 95 | + <forceValues> |
| 96 | + <string>srcBean.getDatasetValuesById("displayName")</string> |
| 97 | + </forceValues> |
| 98 | + </dataset> |
| 99 | + </propertiesBasedSyncOptions> |
| 100 | + </task> |
| 101 | + </tasks> |
| 102 | +</lsc> |
0 commit comments