How to synchronize photo file by Extennsible Connectivity MA


  • Hi, dear people!

    Please, help me. I wan't to synchronize photo (binary information) from other system. I using custom Extensible Connectivity MA and AVP file format for importing. Does AVP support binary data type attributes? And if not how to implement this scenario?

    Thank you!

    King regards,

    Serik Zhunussov.

    Wednesday, December 14, 2011 9:26 AM


All replies

  • I would use a DSML or LDIF format for this.
    My Book - Active Directory, 4th Edition
    My Blog -
    Wednesday, December 14, 2011 8:48 PM
  • Serik,

    AVP doesn't support Binary attribute type, but if you could Base64 encode the photo and store it as a String type, you could write a rules extension and decode it and store it as binary in the metaverse. I haven't done it personally, but in theory it should work.

    FYI - Convert.ToBase64String() and Convert.FromBase64String() can be used.




    Thursday, December 15, 2011 4:32 PM
  • Mark is right. I've actually created an ECMA that does exactly that for a customer, so it should be doable.


    You can get my ECMA here if you need it for inspiration. (

    • Marked as answer by Serik Zhunusov Sunday, December 18, 2011 6:40 AM
    • Edited by Søren Granfeldt Tuesday, December 20, 2011 9:37 AM Added link to code
    Friday, December 16, 2011 8:28 AM
  • Mark is right. I've actually created an ECMA that does exactly that for a customer, so it should be doable.
    Regards, Soren Granfeldt

    The ECMA/XMA I use for this doesn't import the photo. Instead what I do is calculate the CRC of each image and export that to the FIM portal along with the UNC path to the image. I have a workflow activity which fires on update to the hash and photo path attributes that goes out and grabs the image, resizes, and compresses it. I store the compression ratio for each image to get it in the 10KB size cap for GAL Photos so that I can average them and tweak the initial compression to make it more efficient over time.
    My Book - Active Directory, 4th Edition
    My Blog -
    Saturday, December 17, 2011 12:49 AM
  • Let me know if you want the MA (drop me a line at soren(at)
    Regards, Soren Granfeldt
    Monday, December 19, 2011 9:10 AM
  • I have implemented at one customer the use of SSIS to import "images" (SQL blob or files) and transform them into three different sizes into a new SQL table and the FIM uses a standard SQL MA to import images and then exporting to FIM Service and AD and a few other MAs.
    Monday, December 19, 2011 5:09 PM
  • Quick update; new version available that does picture scaling for you -

    Regards, Soren Granfeldt

    Monday, February 13, 2012 9:24 PM