none
Picture of AD using EWS managed api do change? RRS feed

  • Question

  • HI.

    EWS, I want to change the AD picture. But I have a problem.

    I use the source.


     NameResolutionCollection coll =service.ResolveName(MyName, ResolveNameSearchLocation.DirectoryOnly, true, new PropertySet(BasePropertySet.FirstClassProperties));

                    foreach (NameResolution nameRes in coll)
                    {
                        nameRes.Contact.SetContactPicture(photo);
                        nameRes.Contact.Update(ConflictResolutionMode.AutoResolve);
                    }

    where to get the one item id?

    Is there another way?

    help me :(


    Tuesday, August 13, 2013 1:21 AM

Answers

All replies

  • That can only be used to set the Contact Picture on a MAPI contact so a contact that is in the Contacts folder or Public Contact Folders.

    There is no way of setting the AD User picture in EWS, in Exchange 2013 a new operation http://msdn.microsoft.com/en-us/library/exchange/jj900502%28v=exchg.150%29.aspx and also a REST based endpoint was added to allow you to get the User's AD picture. But as of yet no new operations have been added to allow you to add a User Photo via EWS.

    Cheers
    Glen

    Tuesday, August 13, 2013 7:08 AM
  • Thank you.

    Glen

    You've been very helpful.

    There is another question.

    To AQS Is there a way to search subfolders?

    So now the search folder is in use, but because HTML body type does not work.

    Anything else?
    Tuesday, August 13, 2013 9:29 AM