exchangewebservices

Exchange Web Services: UseDefaultCredentials property

末鹿安然 提交于 2019-12-23 18:14:49
问题 This Microsoft page indicates that by setting the UseDefaultCredentials property to true, no login name and password are required to communicate with the Exchange server. However, that is not my experience. My code creates an instance of ExchangeService called service: ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010); If I manually set the credentials as follows, everything works just fine: service.Credentials = new WebCredentials("my@email.address", "my password");

Enumerating shared mailbox names you are able to access using EWS Managed API

强颜欢笑 提交于 2019-12-23 17:31:15
问题 I set up a shared mailbox and can access it and its sub-folders: var folderId = new FolderId(WellKnownFolderName.MsgFolderRoot, "shared.mailbox@domain.local"); var folders = client.FindFolders(folderId, new FolderView(Int32.MaxValue)); To do this I need to know the name of the shared mailbox - in this example, the name of the shared mailbox is shared.mailbox@domain.local . Is there any way to enumerate through all of the shared mailbox names I am able to access? I have tried searching online

How to get the sender of an e-mail in EWS MAPI?

ⅰ亾dé卋堺 提交于 2019-12-23 13:00:55
问题 I'm accessing all e-mails from Exchange Server by code using the EWS Managed API. I loop over all the items in the mailbox and load them: item.Load() I need to know the sender of the item/e-mail message. But I don't know how to access the property that has the information. Any help is appreciated. 回答1: This was my solution: EmailMessage mes = (EmailMessage)item; TextBox1.Text = mes.Sender.Name; After loading the item I just casted it to EmailMessage to get access to the properties and methods

Exchange Web Services Create Meeting Request Working Example

﹥>﹥吖頭↗ 提交于 2019-12-23 10:28:20
问题 Is there a working example anywhere of how to create a meeting request using EWS for Exchange 2007 using C#? Which properties are required? I have added a web service reference and can connect to create and send various items but keep getting the error "Set action is invalid for property." on the response messages. It never says what property is invalid var ews = new ExchangeServiceBinding { Credentials = new NetworkCredential("user", "pass"), Url = "https://servername/ews/exchange.asmx",

AD User Authentication

自闭症网瘾萝莉.ら 提交于 2019-12-23 09:15:06
问题 I am attempting to create an ASP.NET (.NET 3.5) website to connect to our Exchange 2010 server through Exchange Web Services, I am able to connect to EWS when I define the username, password and domain to authenticate with but I would like, if possible, to not include login details in my code. In IIS I have enabled Integrated Windows Authentication for the site, in web.config of the site I have <authentication mode="Windows"/> . The following code is what I have been woking with: svc

Accessing Office 365 user mail data with admin authorisation only

妖精的绣舞 提交于 2019-12-23 05:30:50
问题 I am currently building a simple web app the flow of which is: 1. Admin user for Office 365 provides auth and signs in 2. App retrieves all mail for all users in the domain It is possible to do this with Google Apps for business, i.e. retrieve mail for all users with only the admin auth. How would you go about doing this for Office 365? I am currently encountering this problem using the REST API - Get MS Exchange mail for all group members Is there another way? EWS? I have to believe it's

Microsoft Web Addins “Office.context.mailbox.getCallbackTokenAsync” returns response “Failed” on my Exchange 2016 but works in office 365 online

ぐ巨炮叔叔 提交于 2019-12-23 04:40:43
问题 We have exchange 2016 sever which we have updated to CU-12 recently because we thought it might be the sever update thing, but now it seems it don't works with update too I am simply using Rest API with the help of passing token to get some fields from the current mail using Addin. But It throws an response "failed" every time when the function "Office.context.mailbox.getCallbackTokenAsync" is called. Code: 1 Office.context.mailbox.getCallbackTokenAsync({isRest: true, "asyncContext" : this._

How can I reduce EWS calls when downloading attachments from an Inbox?

半城伤御伤魂 提交于 2019-12-23 04:13:06
问题 I wrote this method with much help from StackO , but I've been unable to find an a was to improve on this. Right now, I iterate through each message in an Office 365 inbox, traverse its attachment collection, and save each file to disk if it's an Excel workbook. This is currently working, but results in a ton of calls to Exchange. The inbox size can get pretty large, and this takes a long time to run as a result, with each call clocking in at around 0.5 seconds. If I've counted right, the

HTTP 401 Unauthorized error in sending GetItem Request

坚强是说给别人听的谎言 提交于 2019-12-23 03:47:12
问题 I'm using EWS GetItem operation to fetch data from exchange server, but i've got following error Error 401 fault: SOAP-ENV:Server[no subcode] "HTTP Error" Detail: HTTP/1.1 401 Unauthorized However my login credential are correct, since those are works well with findItem request and response, but when GetItem request goes to server it give above error. My credentials are like: soap *pSoap = proxy->soap; proxy->soap_endpoint = "https://outlook.office365.com/ews/exchange.asmx"; pSoap->userid =

Possible to update an Exchange o365 Online meeting Location to another room with graphapi or graph explorer

旧巷老猫 提交于 2019-12-23 02:19:26
问题 I am able to update the meeting event but does not update location to an actual room on Azure Active directory, only updates to text. So say someroom is an meeting room.. we only get "someroom" text location. Is this possible? how Trying this. Also read maybe I need location.AdditonalData , but see no examples anywhere. PATCH : Event_URL Body PAYLOAD : { "subject": "Test Graph 2", "location": { "displayName": "someroom", "locationEmailAddress": "someroom@mydomain.onmicrosoft.com", "address":