title: The property can not be used with this type of restriction error when trying to get Exchange contact by id using IndependentSoft EWS API
body: <p>I am getting the following error when trying to retrieve a contact from Exchange server using IndependentSoft EWS API:</p>
  
  <pre><code>The property can not be used with this type of restriction.
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>public Contact GetContact(string id){
  
      var restriction = new IsEqualTo(PersonaPropertyPath.PersonaId, id);
  
      var persona = _service.FindPeople(StandardFolder.Contacts, restriction).Personas.FirstOrDefault();
  
      if (persona == null)
          throw new NullReferenceException("Could not find contact in Exchange");
  
      var contact = new Contact
      {
          Id = persona.PersonaId.ToString(),
          Name = persona.DisplayName
      };
  
      if (persona.EmailAddress != null)
      {
          contact.Email = persona.EmailAddress.EmailAddress;
      }
  
      return contact;
  }
  </code></pre>