jamesiarmes / php-ews

PHP Exchange Web Services
http://jamesarmes.com/php-ews/
MIT License
567 stars 302 forks source link

Corrupt contact email address when using FindItem #578

Closed vielhuber closed 4 years ago

vielhuber commented 4 years ago

Version: master PHP version: 7.2 Microsoft Exchange version: 2013

When using FindItem to get all specific contact, the email adress is wrong.

This is my "EmailAddresses" field I receive:

 public 'EmailAddresses' => 
        object(jamesiarmes\PhpEws\Type\EmailAddressDictionaryType)[7086]
          public 'Entry' => 
            array (size=1)
              0 => 
                object(jamesiarmes\PhpEws\Type\EmailAddressDictionaryEntryType)[7087]
                  public '_' => string '/o=exchange/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=65c12669cfc84b1cbbc77830d2a87060-EEUID117978' (length=124)
                  public 'Key' => string 'EmailAddress1' (length=13)
                  public 'MailboxType' => null
                  public 'Name' => null
                  public 'RoutingType' => null

As you can see, the field "_" is corrupt and does not show the email address but a weird path.

On some of my contacts (like 40 of 2000), this is the case; On other contacts, this is not the case. If I remove and readd the contacts, the behaviour is the same.

Anybody also got this strange bug?

vielhuber commented 4 years ago

This behaviour is intended: If the contact has a email of any "internal user", this "link" is shown when using "FindItem".

Source: https://social.technet.microsoft.com/Forums/exchange/de-DE/e78bd9ad-4ec3-4f2d-9939-747cafe77faa/how-to-resolve-the-email-address-in-this-form-oabcdouexchange-administrative-group?forum=exchangesvrdevelopment&prof=required

I fixed this by calling "GetItem".