Exchange on prem Authentication

shahd salama 1 Reputation point
2021-10-04T09:48:03.613+00:00

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("shahd@dz.local", "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

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,373 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
528 questions
{count} votes