I am working on creating a connector to exchange server on prem to retrieve personal calendar to view it in our system which is called "DoZen".
the exchange server has adfs configured, and "DoZen" users authenticate to the system using adfs
I want to figure out a way to authenticate to exchange without passing the credentials.. as the system that uses the connector does not store the credentials.
as a start I used this code
ExchangeService service = new ExchangeService()
Credentials = new WebCredentials("firstname.lastname@example.org", "xxxxxx")
service.TraceEnabled = true;
service.TraceFlags = TraceFlags.All;
service.Url = new Uri("https://ServerName/ews/exchange.asmx");
it worked fine but this is not what I want, i do not have the credentials as mentioned before.
I removed the credentials and used
service.UseDefaultCredentials = true;
but it gave me unauthorized 401