Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Adding appointments to multiple accounts in Exchange

Posted on 2011-03-15
5
Medium Priority
?
306 Views
Last Modified: 2013-12-17
using System;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Exchange.WebServices.Data;

namespace EwsManagedTest
{
    class Program
    {
        static void Main(string[] args)
        {
            ServicePointManager.ServerCertificateValidationCallback +=
            delegate(
                object sender,
                X509Certificate certificate,
                X509Chain chain,
                SslPolicyErrors sslPolicyErrors)
            {
                return true;
            };


            string userName = "login";
            string password = "password";
            string domain = "domain.com";
            string exchangeWebServiceUrl = "https://domain.com/ews/exchange.asmx";
            ExchangeService service = new ExchangeService();
            service.Credentials = new WebCredentials(userName, password, domain);
            service.Url = new Uri(exchangeWebServiceUrl);

            Appointment appointment = new Appointment(service);
            appointment.Subject = "Testing";
            appointment.Start = DateTime.Now;
            appointment.End = appointment.Start.AddHours(1);
            appointment.Save();
            
        }
    }
}

Open in new window


How do I modify this code to add new appointments to exchange calendar for multiple accounts using just one master login credentials?
0
Comment
Question by:joein610
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 74

Assisted Solution

by:Glen Knight
Glen Knight earned 2000 total points
ID: 35142066
Its down to the permissions on the mailbox.  If the user you are authenticating with has access to all the mailboxes then it will be able to create a calendar entry.
0
 

Author Comment

by:joein610
ID: 35147276
How do I mention it in the code? Let's say that my login is xxx and I want to add a calendar item for the user yyy. How do I do that? Do I still log in with the same credentials?

0
 
LVL 74

Accepted Solution

by:
Glen Knight earned 2000 total points
ID: 37419629
Yes, you just create a service account that has access to all the mailboxes and then use this account to create the appointments.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question