How to deny user develop code send mail RRS feed

  • Question

  • Hello

         Current everyone can develop code to send email by use code below , How to configure to restrict some user can instead all user

    sample any user can use code below to connect exchange

         // Identify the service binding and the user.
    ExchangeServiceBinding service =
    new ExchangeServiceBinding();
    service.Credentials =
    new NetworkCredential("<username>", "<password>", "<domain>");
    service.RequestServerVersionValue =
    new RequestServerVersion();
    service.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;
    service.Url =

    Best Regards,

    Saturday, April 28, 2018 12:44 AM

All replies

  • You can control EWS Access using something like https://msdn.microsoft.com/en-us/library/office/dn467892(v=exchg.150).aspx . However you may find that restricting access will break certain applications that don't have unique user agents.


    Monday, April 30, 2018 12:27 AM
  • Hello

       I just read docs https://docs.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-control-access-to-ews-in-exchange

        I think we can user command below to block all custom code application

    Allow a list of client applications to use EWS.

    Set-OrganizationConfig -EwsApplicationAccessPolicy:EnforceAllowList -EwsAllowList:"OWA/*"


    Sunday, June 17, 2018 12:49 PM