List all users assigned to a calendar using EWS C#/Powershell
<p>I have an exchange server that list 27 calendars. I need to communicate with this server to figure out what users are assigned to what calendar. I'm not good with PowerShell and i know this can be used to retreive the information i may need. I'd preffer to use Microsoft.Exchange.Webservice.Data but i dont beleive there is a way to retreive this information using this. The code below is what im using to connect with EWS and thus far is not a problem Im just looking for the best way to query what users have access to a calendar.</p>

<pre><code>     static void Main(string[] args)
{
    ExchangeService service = new ExchangeService  (ExchangeVersion.Exchange2010_SP2);
    //***********New**********************
    ExchangeService  mailbox = new ExchangeService(ExchangeVersion.Exchange2010_SP2); 
    string mailboxEmail = "JNichols@example.org";
    WebCredentials wbcred = new WebCredentials("exampleUsername", "examplePassword"); 
    mailbox.Credentials = wbcred;
//    mailbox.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, mailboxEmail);

    mailbox.AutodiscoverUrl(mailboxEmail,  RedirectionUrlValidationCallback);
    mailbox.HttpHeaders.Add("X-AnchorMailBox", mailboxEmail);
    FolderId mb1Inbox = new FolderId(WellKnownFolderName.Inbox, mailboxEmail);
     //SetStreamingNotification(mailbox, mb1Inbox);

    mailbox.Url = new Uri("https://webmail.example.org/EWS/Exchange.asmx");
    Dictionary&lt;string, Folder&gt; x = GetSharedCalendarFolders(mailbox, mailboxEmail);
}

internal static bool RedirectionUrlValidationCallback(string redirectionUrl)
{
    //The default for the validation callback is to reject the URL
    bool result=false;

    Uri redirectionUri=new Uri(redirectionUrl);
    if(redirectionUri.Scheme=="https")
    {
        result=true;
    }
    return result;
}
</code></pre>