exchangewebservices

Find out which users have Full Access on a mailbox

白昼怎懂夜的黑 提交于 2019-12-02 17:14:34
问题 I am trying to draw a graph of which Exchange User has which permissions on which Exchange mailboxes, coloring them according to the type of permission. As of now, I cannot find out all types of permissions that Exchange takes into account. I can, using EWS, find out who was granted access to a mailbox by the user himself: foreach(var permission in calendarFolder.Permissions) { // do sth. } But then there is the possibility that an admin grants someone permission over a mailbox by adding him

Authenticate an EWS application by using OAuth

我们两清 提交于 2019-12-02 16:45:08
问题 I was trying to follow the steps from this this tutorial to authenticate my app by oAuth and use the retrieved token for EWS managed API. Here is the final code: static void Run() { string authority = ConfigurationSettings.AppSettings["authority"]; string clientID = ConfigurationSettings.AppSettings["clientID"]; Uri clientAppUri = new Uri(ConfigurationSettings.AppSettings["clientAppUri"]); string serverName = ConfigurationSettings.AppSettings["serverName"]; AuthenticationResult

PR_SEARCH_KEY using EWS

送分小仙女□ 提交于 2019-12-02 15:16:02
问题 I need to extract PR_SEARCH_KEY for some mails using EWS . I was doing it using Outlook API earlier. But I want to re-write complete code in EWS as it is much powerful. Old code: private String GetLnksForMailBoxMails(Outlook.MailItem mail) { const string PR_SEARCH_KEY = "http://schemas.microsoft.com/mapi/proptag/0x300B0102"; Outlook.PropertyAccessor pa = mail.PropertyAccessor; String searchKey = pa.BinaryToString(pa.GetProperty(PR_SEARCH_KEY)); // Console.WriteLine("Here is lnks for normal

Authenticate an EWS application by using OAuth

吃可爱长大的小学妹 提交于 2019-12-02 13:38:47
I was trying to follow the steps from this this tutorial to authenticate my app by oAuth and use the retrieved token for EWS managed API. Here is the final code: static void Run() { string authority = ConfigurationSettings.AppSettings["authority"]; string clientID = ConfigurationSettings.AppSettings["clientID"]; Uri clientAppUri = new Uri(ConfigurationSettings.AppSettings["clientAppUri"]); string serverName = ConfigurationSettings.AppSettings["serverName"]; AuthenticationResult authenticationResult = null; AuthenticationContext authenticationContext = new AuthenticationContext(authority, false

C# EWS - identification for SENT emails - InternetMessageId

痴心易碎 提交于 2019-12-02 13:17:57
问题 Im developing a Tickets System. I need to send a Ticket(mail) to a EmailAddressList and receive the answers by email regarding to this Email/Ticket. Is there anyway to get an InternetMessageId from the new Ticket/Email that I sent? Thank you! 回答1: Make sure that when you send your messages that you use SendAndSaveCopy() to place a copy of the message in the SentItems folder. Then you will want to use the FindItems() method to look for messages in the WellKnownFolderName.SentItems ,

PR_SEARCH_KEY using EWS

痞子三分冷 提交于 2019-12-02 12:14:19
I need to extract PR_SEARCH_KEY for some mails using EWS . I was doing it using Outlook API earlier. But I want to re-write complete code in EWS as it is much powerful. Old code: private String GetLnksForMailBoxMails(Outlook.MailItem mail) { const string PR_SEARCH_KEY = "http://schemas.microsoft.com/mapi/proptag/0x300B0102"; Outlook.PropertyAccessor pa = mail.PropertyAccessor; String searchKey = pa.BinaryToString(pa.GetProperty(PR_SEARCH_KEY)); // Console.WriteLine("Here is lnks for normal mail box:{0} ", searchKey); return searchKey; } New Code: ExtendedPropertyDefinition eDef = new

Exchange Web Services - convert emailitem attachment from Base64 string to Byte gives error

岁酱吖の 提交于 2019-12-02 10:18:40
I am trying to read an email item attachment using EWS and save it to disk as a text file so it can be used later on. I am getting an error: "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters. " here is my code: Directory.CreateDirectory(emailAttachmentsPath); // Put attachment contents into a stream. C:\Dev\EWSHelloWorld emailAttachmentsPath = emailAttachmentsPath + "\\" + sEmailSubject+".txt"; //save to disk using (Stream FileToDisk = new FileStream(emailAttachmentsPath

How to specify EDT (daylight saving time) to Exchange Web Services (XML not managed)?

无人久伴 提交于 2019-12-02 10:08:32
问题 The article here: http://msdn.microsoft.com/en-us/library/exchange/bb738399(v=exchg.80).aspx in the section "Use Registry Key Names for TimeZoneNames", tells me that when I can create a calendar item in Exchange, I can pass it the name of a timezone. This is sort-of working, but how do I name "Eastern Daylight Time"? Only 'US Eastern Standard Time' is accepted as valid. In works in that I schedule something for say 14:00, when it displays in my Google calendar I see it is displaying at 15:00

Save Email as MSG file without using Outlook (COM object, etc.) or 3rd party software

牧云@^-^@ 提交于 2019-12-02 10:08:22
问题 Right now, I'm using the Exchange Web Services API with PowerShell to pull down specific emails from exchange and save them as EML files. This works great; however, the user/customer requires the emails to be in msg format. There are two ways that I've seen to do this: Use Outlook/Outlook COM Object Use a 3rd party library or software (like this: http://www.independentsoft.de/exchangewebservices/tutorial/downloadmessagetomsgfile.html) Are there any other alternatives? I would like to stick

Office365 REST v1.0 API calendar does not return recurrences

巧了我就是萌 提交于 2019-12-02 09:49:38
The Microsoft Office team annouced today the availability of a REST API across the Office365 suite, as well as guides for writing apps across the different app ecosystems. To evaluate the API, I simply wanted to get a listing of my events for today. The new API seems to be relatively unchanged from the preview API The basic GET is quite simple: https://outlook.office365.com/api/v1.0/me/events This gives back listing of calendar events. To get a specific day, we should be able to use OData Query Parameters . For example: https://outlook.office365.com/api/v1.0/me/events?$filter=End gt 2014-10-28