Code Monkey home page Code Monkey logo

ewseditor's Introduction

Project Description

EWSEditor is an API explorer - an application which is used by programmers to explore the usage of an API. In this case it was created to demonstrates the EWS Managed API and EWS calls. It is an open-source sample and is not a Microsoft application. There is no support for this code or any of its builds.

EWSEditor has three goals:

1.Demonstrate the Exchange Web Services Managed API functionality and simplicity to developers through its source code. 
2.Demonstrate the Exchange Web Services SOAP traffic used to perform actions initiated through an explorer user interface. 
3.Assist non-developers in debugging and understanding Exchange stores by exploring items, folders, and their properties in depth. 

Each release of EWSEditor includes the distribution of the EWS Managed API it was built for. This version of EWSEditor uses EWS Managed API built from GIT. This version of EWSEditor uses .NET Framework version 4.7.2 and a build of the EWS Managed API built as of check-in 25a393d on Jul 24, 2018.

To build EWSEditor

Add the following NuGet packages:

Microsoft.IdentityModel.Clients.ActiveDirectory  (For oAuth)

System.Management.Automation.dll  

Microsoft.Bcl

Microsoft.Bcl.Build

Microsoft.Net.Http

There is a reference to CDOSYS, for which Visual Studio generated the ADODB and CDO interops. If you need to regenerate them then remove the references and be sure to delete the interop files. Next set a new reference to CDOSYS and Visual studio will regenerate both interop files. CDOSYS is a COM component which comes with Windows and has both 64bit and 32bit registrations. CDOSYS is used in EWSEDitor for its MIME parsing functions.

The version of .NET used is .Net 4.7.2. So, be sure this version of .NET is installed.

 https://dotnet.microsoft.com/download/dotnet-framework/net472

You should be able to use a newer version of .NET, however it’s not been tested against higher versions. The reason 4.7.2 was chosen is that it is widely installed and had needed features and fixes for EWSEditor, so it’s used as the minimum bar for .NET. Later builds of EWSEditor may use a newer version of .NET.

If you have issues with the referenced components then update the components and references.

About the EWS Managed API

EWSEditor relies heavily on the EWS Managed API. The EWS Managed API requires a minimal of .NET 3.5 - however, its best to use a recent build from the published source code. The build of the EWS Managed API included with EWSEditor is from 25a393d on Jul 24, 2018. The GitHub source for the EWS Managed API has fixes which are not in the MSDN release. If you think you are running into an issue with the EWS Managed API which might have been fixed then you should consider pulling fresh code for the EWS Managed API and building it for usage with EWSEditor and other code.

Here is where can download the source code for the EWS Managed API.

https://github.com/OfficeDev/ews-managed-api

Here is where you can get the old 2.2 built version of the EWS Managed API. There has not been a build published on MSDN in many years. So, if you want the fixes done over the past few years then you should not use this download and instead download the source code and build it.

https://www.microsoft.com/en-us/download/details.aspx?id=40779

WARNING: If you are tempted to use a build of the EWS Managed API you found on the web (including NuGet) then you should pass. Such downloads may contain malicious code. One of my customers security software started screaming at them that a build of what seemed to be the EWS Managed API from a publisheddownload from NuGet was causing security violations. I looked at the publisher and it was nobody I know from Microsoft. So, unless you want to run the risk of a toxic download then you should be downloading the EWS Managed API and building it yourself.

ewseditor's People

Contributors

drvespa avatar dseph avatar poizan42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ewseditor's Issues

Azure US Gov, Delegated auth, null ref exception.

Hi, testing delegated authentication with a GCCH/DOD account is failing with a null ref exception when creating the service obj. Debug shows the failure in the oAuthHelper class - seems as tho MSAL doesn't like the PCA object created with the default/global authority and trying to use that for non-global auth flows. I worked up a quick switch statement to take the authority string and map that to the enum used in the PCA options object so that we create the PCA object with the correct authority from the beginning.

oAuthHelper.cs (inject @ LINE 92):

        //Initialize the cloudInstance enum.
        var OAuth2AzCloudInstance = AzureCloudInstance.None;

        //Switch to set logon authority enum.
        switch (OAuth2Authority)
        {
            case "https://login.microsoftonline.us":
                OAuth2AzCloudInstance = AzureCloudInstance.AzureUsGovernment;
                break;

            case "https://login.microsoftonline.de":
                OAuth2AzCloudInstance = AzureCloudInstance.AzureGermany;
                break;

            case "https://login.partner.microsoftonline.cn":
                OAuth2AzCloudInstance = AzureCloudInstance.AzureChina;
                break;
            default:
                OAuth2AzCloudInstance = AzureCloudInstance.AzurePublic;
                break;
        }

        if (OAuth2RedirectUrl != "<Do not use a redirect URL.>")
        {
            // Configure the MSAL client to get tokens
            pcaOptions = new PublicClientApplicationOptions
            {
                ClientId = ClientId,
                TenantId = TenantId,
                RedirectUri = OAuth2RedirectUrl,
                AzureCloudInstance = OAuth2AzCloudInstance
            };

Problem adding Calendar folder

Hi, great and useful project!
I receive an error while trying to add the Calendar as root folder:

Exception details:
Message: Property is not valid for this object type.
Type: Microsoft.Exchange.WebServices.Data.ServiceResponseException
Source: Microsoft.Exchange.WebServices
ErrorCode: ErrorInvalidPropertyRequest
ErrorMessage: Property is not valid for this object type.
ErrorProperties:
UnreadCount
Stack Trace:
   at Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary() in e:\EWSManagedAPI\ews-managed-api\Core\Responses\ServiceResponse.cs:line 262
   at Microsoft.Exchange.WebServices.Data.ServiceResponse.ThrowIfNecessary() in e:\EWSManagedAPI\ews-managed-api\Core\Responses\ServiceResponse.cs:line 252
   at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute() in e:\EWSManagedAPI\ews-managed-api\Core\Requests\MultiResponseServiceRequest.cs:line 141
   at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalBindToFolders(IEnumerable`1 folderIds, PropertySet propertySet, ServiceErrorHandling errorHandling) in e:\EWSManagedAPI\ews-managed-api\Core\ExchangeService.cs:line 363
   at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder(FolderId folderId, PropertySet propertySet) in e:\EWSManagedAPI\ews-managed-api\Core\ExchangeService.cs:line 291
   at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder[TFolder](FolderId folderId, PropertySet propertySet) in e:\EWSManagedAPI\ews-managed-api\Core\ExchangeService.cs:line 310
   at Microsoft.Exchange.WebServices.Data.Folder.Bind(ExchangeService service, FolderId id, PropertySet propertySet) in e:\EWSManagedAPI\ews-managed-api\Core\ServiceObjects\Folders\Folder.cs:line 58
   at EWSEditor.Forms.FolderTreeForm.AddRootFolderToTreeView(ExchangeService service, EwsEditorAppSettings oAppSettings, FolderId folderId, TreeNode parent) in e:\msft tools\ewseditor\EWSEditor\Forms\FolderTreeForm.cs:line 1621
   at EWSEditor.Forms.FolderTreeForm.AddRootFolderToTreeView(FolderId folderId, TreeNode parent) in e:\msft tools\ewseditor\EWSEditor\Forms\FolderTreeForm.cs:line 1616
   at EWSEditor.Forms.FolderTreeForm.AddRootFolderMenu_Click(Object sender, EventArgs e) in e:\msft tools\ewseditor\EWSEditor\Forms\FolderTreeForm.cs:line 1109
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The XML document ended unexpectedly.

Hello,
i'm using Exchange 2016 with CU11 and EWS-Editor Autodiscover Viewer returns only an error message.
Only EWS Schema 2007_SP1 works, all others displays the followed error message.
I already checked http traffic in SoapUI and Exchange returns all messages without issues.

Caught Exception:

Error Message: The XML document ended unexpectedly.
Inner Error Message: 
Stack Trace:    at Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read() in e:\EWSManagedAPI\ews-managed-api\Core\EwsXmlReader.cs:line 174

at Microsoft.Exchange.WebServices.Autodiscover.WebClientUrlCollection.LoadFromXml(EwsXmlReader reader) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\WebClientUrlCollection.cs:line 57
at Microsoft.Exchange.WebServices.Autodiscover.GetUserSettingsResponse.ReadSettingFromXml(EwsXmlReader reader) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\Responses\GetUserSettingsResponse.cs:line 200
at Microsoft.Exchange.WebServices.Autodiscover.GetUserSettingsResponse.LoadUserSettingsFromXml(EwsXmlReader reader) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\Responses\GetUserSettingsResponse.cs:line 160
at Microsoft.Exchange.WebServices.Autodiscover.GetUserSettingsResponse.LoadFromXml(EwsXmlReader reader, String endElementName) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\Responses\GetUserSettingsResponse.cs:line 126
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverResponseCollection1.LoadResponseCollectionFromXml(EwsXmlReader reader) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\AutodiscoverResponseCollection.cs:line 117 at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverResponseCollection1.LoadFromXml(EwsXmlReader reader, String endElementName) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\AutodiscoverResponseCollection.cs:line 92
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverRequest.LoadFromXml(EwsXmlReader reader) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\Requests\AutodiscoverRequest.cs:line 588
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverRequest.ReadSoapBody(EwsXmlReader reader) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\Requests\AutodiscoverRequest.cs:line 573
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverRequest.InternalExecute() in e:\EWSManagedAPI\ews-managed-api\Autodiscover\Requests\AutodiscoverRequest.cs:line 159
at Microsoft.Exchange.WebServices.Autodiscover.GetUserSettingsRequest.Execute() in e:\EWSManagedAPI\ews-managed-api\Autodiscover\Requests\GetUserSettingsRequest.cs:line 110
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetUserSettings(List1 smtpAddresses, List1 settings, Nullable1 requestedVersion, Uri& autodiscoverUrl) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\AutodiscoverService.cs:line 1080 at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetSettings[TGetSettingsResponseCollection,TSettingName](List1 identities, List1 settings, Nullable1 requestedVersion, GetSettingsMethod2 getSettingsMethod, Func1 getDomainMethod) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\AutodiscoverService.cs:line 1041
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(List1 smtpAddresses, List1 settings) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\AutodiscoverService.cs:line 893
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetSoapUserSettings(String smtpAddress, List`1 requestedSettings) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\AutodiscoverService.cs:line 844
at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames) in e:\EWSManagedAPI\ews-managed-api\Autodiscover\AutodiscoverService.cs:line 1682
at EWSEditor.Forms.AutodiscoverViewerForm.AutodiscoverGetUserSettings(AutodiscoverService& service, String sUserSmtpAddress) in C:\Users\danba\Documents\GitHub\EwsEditor\EWSEditor\Forms\Discovery\AutodiscoverViewerForm.cs:line 178
See:

Calendar item properties not visible when viewing a Shared Calendar

When opening a calendar item in my own mailbox, I am shown the individual calendar item properties.

If I open a calendar for someone who has made me an owner on their calendar, the properties don't load. This used to work on 1.17.0.33450, but doesn't work on 1.18.1.29950 or 1.19.1.24286.

Steps to reproduce:
-Via Outlook, logged in as User2, add User1 as an owner on User2's Calendar
-Open EWSEditor as User1, and connect to User1's mailbox:
-File | New Exchange Service...
-Provide Autodiscover Email address of User1
-Select appropriate EWS Schema Version (in my case, Exchange2010_SP2)
-Click OK
-Click YES to add the mailbox root to the tree view
-Select the MsgFolderRoot folder
-Select Other | Find Appointments (CalendarView...)
-Click the "..." button
-Select the "Identify folder by well known name." radio button
-Select "Calendar" from the "Folder Name" drop down menu
-In the STMP Address field (spelling mistake on this page of the GUI) enter the email address for User2
-Click OK
-Select a Start Time and End Time that contains any calendar items
-Click OK
-In the new pop-up window, select any of the calendar items

It is at this point that I would expect the bottom pane to display the EWS item properties, but it is blank. The EWSEditor.log file does contain the property values, so it is able to read them, it's just not displaying them.

Screenshot showing it broken:
image

Screenshot showing it working on earlier version:
image

Multiple-Select Option

I need the option to multiple select sub-folders (in this case: sub-folders within a folder called "Tasks"). Is this possible? If not, are there any keyboard shortcuts I can use?

Unable to start exe on Windows 2016

When I execute EWSEditor.exe as a domain user, which is local admin on the machine, nothing happens. In the Application eventlog I see event 5973 every time I try:

Activation of app Microsoft.Windows.Apprep.ChxApp_cw5n1h2txyewy!App failed with error: This app can't be activated by the Built-in Administrator. See the Microsoft-Windows-TWinUI/Operational log for additional information.

What could be the issue here?

How is OAuth expected to work?

What's needed to make OAuth work with this? I've put in the client ID of the `365 app I'm using, but there is no apparent place to put the secret. As a result, when I go through the OAuth flow with the current release (1.21) I get this:

The request body must contain the following parameter: 'client_assertion' or 'client_secret'.

I'm not sure what to do to get past this.

Here's the full error:

Exception details:
Message: One or more errors occurred.
Type: System.AggregateException
Source: mscorlib
Stack Trace:
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at EWSEditor.Common.AuthenticationHelper.Do_OAuth(String& MailboxBeingAccessed, String& AccountAccessingMailbox, String sAuthority, String sAppId, String sRedirectURL, String sServername, String& sBearerToken, PromptBehavior oPromptBehavior) in C:\this\GitHub\EwsEditor\EWSEditor\Common\EwsHelpers\AuthenticationHelper.cs:line 65
   at EWSEditor.Common.AuthenticationHelper.Do_OAuth(String& MailboxBeingAccessed, String& AccountAccessingMailbox, String sAuthority, String sAppId, String sRedirectURL, String sServername, String& sBearerToken) in C:\this\GitHub\EwsEditor\EWSEditor\Common\EwsHelpers\AuthenticationHelper.cs:line 83
   at EWSEditor.Forms.ServiceDialog.BtnOK_Click(Object sender, EventArgs e) in C:\this\GitHub\EwsEditor\EWSEditor\Forms\Dialogs\ServiceDialog.cs:line 248
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Exception details:
Message: AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.
Trace ID: e7002e4c-d45a-4881-82fd-589d4a5aac00
Correlation ID: 66516535-b808-4594-996f-48e014a5d9fa
Timestamp: 2020-09-24 13:24:02Z
Type: Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException
Source: Microsoft.IdentityModel.Clients.ActiveDirectory
Stack Trace:
   at Microsoft.Identity.Core.OAuth2.OAuthClient.<GetResponseAsync>d__18`1.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Core\OAuth2\OAuthClient.cs:line 120
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Core.OAuth2.OAuthClient.<GetResponseAsync>d__17`1.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Core\OAuth2\OAuthClient.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendHttpMessageAsync>d__75.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\AcquireTokenHandlerBase.cs:line 405
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendTokenRequestAsync>d__72.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\AcquireTokenHandlerBase.cs:line 333
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<CheckAndAcquireTokenUsingBrokerAsync>d__62.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\AcquireTokenHandlerBase.cs:line 266
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<RunAsync>d__60.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Internal\Flows\AcquireTokenHandlerBase.cs:line 241
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonAsync>d__42.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\AuthenticationContext.cs:line 608
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenAsync>d__32.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\AuthenticationContext.cs:line 407
Exception details:
Message: Response status code does not indicate success: 401 (Unauthorized).
Type: Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException
Source: Microsoft.IdentityModel.Clients.ActiveDirectory
Stack Trace:
   at Microsoft.Identity.Core.OAuth2.OAuthClient.<GetResponseAsync>d__18`1.MoveNext() in D:\a\1\s\src\Microsoft.IdentityModel.Clients.ActiveDirectory\Core\OAuth2\OAuthClient.cs:line 62

Accept/decline

How I can using managed ews api access required attendies object, and modifier by hand he accepted or declined meeting. This task required for migration.

Cannot set extended property on a folder under the message-folder root

In debugging an issue where exchange-folders weren't being presented to an IMAP-client I used EwsEditor to recognize that the folders affected didn't have the FolderClass property (which should be there and set to IPF.Note). I tried setting that property for a quick test but always get an exception. See attached dialog to set the property and the exception. I ended up changing FolderClass with Powershell over EWS Managed API - which I would have had to do anyway because many folders were affected - but being able to "prototype" my fix in EwsEditor would have been helpful ...
Extended Property Definition
Exception

Moved email to inbox not tracked in CRM

When we move email form a spam folder to the inbox it does not get tracked in CRM but it does not appear in the Show To-Be
Tracked Items
Is there a way to get all thes items tracked afterwards?
"[Name:] crmLinkState [PropSet:] PublicStrings Microsoft.Exchange.WebServices.Data.MapiPropertyType.Double value 2" is missing with these email items

Errors Trying to Run After Downloading

I just downloaded the zip file, extracted it, and opened the .sln file in Visual Studio Enterprise 2017. I immediately tried to run it with a configuration of Debug and Any CPU, but was unable to due to the following errors shown in the Error List window:
ewseditorerrors

The project references look like this:
ewseditormissingreferences

NuGet says the following packages are installed (it ran a package restore when I initially tried to run the project):

  • Microsoft.Bcl, version 1.1.10
  • Microsoft.Bcl.Build, version 1.0.21
  • Microsoft.IdentityModel.Clients.ActiveDirectory, version 3.17.0
  • Microsoft.Net.Http, version 2.2.29
  • System.Management.Automation.dll, version 10.0.10586

Am I missing something? I couldn't find a README with setup instructions.

Thanks!

How one can connect to o365 group mailbox?

I was trying to connect to group mailbox , created for MS team, using a user(without mailbox) having applicationimpersonation privilege using impersonation but was not able to.
Can this be done using this tool?

ERROR using TLS on Windows Server 2012R2

Is there additional settings for using TLS?
We reconfigured our HTTPS for support TLS on exchange server side. After that on client side ( Windows Server 2012R2 with comleted Windows Update on 09/20/2019 ) we get error:

Exception details:
Message: The request failed. The underlying connection was closed: An unexpected error occurred on a send.
Type: Microsoft.Exchange.WebServices.Data.ServiceRequestException
Source: Microsoft.Exchange.WebServices
Stack Trace:
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute()
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalConvertIds(IEnumerable1 ids, IdFormat destinationFormat, ServiceErrorHandling errorHandling)
at Microsoft.Exchange.WebServices.Data.ExchangeService.ConvertIds(IEnumerable`1 ids, IdFormat destinationFormat)
at EWSEditor.Common.Extensions.ExchangeServiceExtensions.TestExchangeService(ExchangeService service) in C:\Work\Sources\ewseditor\EWSEditor_1_20\Common\Extensions\ExchangeServiceExtensions.cs:line 183
at EWSEditor.Forms.ServiceDialog.BtnOK_Click(Object sender, EventArgs e) in C:\Work\Sources\ewseditor\EWSEditor_1_20\Forms\Dialogs\ServiceDialog.cs:line 278
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Exception details:
Message: The underlying connection was closed: An unexpected error occurred on a send.
Type: System.Net.WebException
Source: System
Stack Trace:
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
Exception details:
Message: Authentication failed because the remote party has closed the transport stream.
Type: System.IO.IOException
Source: System
Stack Trace:
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)

But : on client side with ordinary Windows-10 it works well !

Main window is cut off

Using the latest release binary (1.21), the main window is cut off on the right side and is not resizable or scrollable.

image

Request Failed 401 Target Principal Name Incorrect

Hello,
when connecting to our internal Exchange server we receive the following:

Exception details:
Message: The request failed. The remote server returned an error: (401) Unauthorized.
Type: Microsoft.Exchange.WebServices.Data.ServiceRequestException
Source: Microsoft.Exchange.WebServices
Stack Trace:
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) in e:\EWSManagedAPI\ews-managed-api\Core\Requests\ServiceRequestBase.cs:line 750
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request) in e:\EWSManagedAPI\ews-managed-api\Core\Requests\ServiceRequestBase.cs:line 640
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute() in e:\EWSManagedAPI\ews-managed-api\Core\Requests\SimpleServiceRequestBase.cs:line 55
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute() in e:\EWSManagedAPI\ews-managed-api\Core\Requests\MultiResponseServiceRequest.cs:line 132 at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalConvertIds(IEnumerable1 ids, IdFormat destinationFormat, ServiceErrorHandling errorHandling) in e:\EWSManagedAPI\ews-managed-api\Core\ExchangeService.cs:line 4131
at Microsoft.Exchange.WebServices.Data.ExchangeService.ConvertIds(IEnumerable1 ids, IdFormat destinationFormat) in e:\EWSManagedAPI\ews-managed-api\Core\ExchangeService.cs:line 4144 at EWSEditor.Common.Extensions.ExchangeServiceExtensions.TestExchangeService(ExchangeService service) in C:\Users\danba\Documents\GitHub\EwsEditor\EWSEditor\Common\Extensions\ExchangeServiceExtensions.cs:line 183 at EWSEditor.Exchange.EwsProxyFactory.InitializeWithDefaults(Nullable1 version, Uri ewsUrl, String autodiscoverAddress) in C:\Users\danba\Documents\GitHub\EwsEditor\EWSEditor\Common\EwsProxyFactory.cs:line 491
at EWSEditor.Exchange.EwsProxyFactory.InitializeWithDefaults() in C:\Users\danba\Documents\GitHub\EwsEditor\EWSEditor\Common\EwsProxyFactory.cs:line 451
at EWSEditor.Forms.FolderTreeForm.OpenDefaultExchangeServiceMenu_Click(Object sender, EventArgs e) in C:\Users\danba\Documents\GitHub\EwsEditor\EWSEditor\Forms\FolderTreeForm.cs:line 876
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Exception details:
Message: The remote server returned an error: (401) Unauthorized.
Type: System.Net.WebException
Source: System
Stack Trace:
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.Exchange.WebServices.Data.EwsHttpWebRequest.Microsoft.Exchange.WebServices.Data.IEwsHttpWebRequest.GetResponse() in e:\EWSManagedAPI\ews-managed-api\Core\EwsHttpWebRequest.cs:line 132
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request) in e:\EWSManagedAPI\ews-managed-api\Core\Requests\ServiceRequestBase.cs:line 740
Exception details:
Message: The target principal name is incorrect
Type: System.ComponentModel.Win32Exception
Source: System
Stack Trace:
at System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob, Boolean throwOnError, SecurityStatus& statusCode)
at System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob)
at System.Net.NegotiateClient.DoAuthenticate(String challenge, WebRequest webRequest, ICredentials credentials, Boolean preAuthenticate)
at System.Net.NegotiateClient.Authenticate(String challenge, WebRequest webRequest, ICredentials credentials)
at System.Net.AuthenticationManagerDefault.Authenticate(String challenge, WebRequest request, ICredentials credentials)
at System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest httpWebRequest, ICredentials authInfo)
at System.Net.HttpWebRequest.CheckResubmitForAuth()
at System.Net.HttpWebRequest.CheckResubmit(Exception& e, Boolean& disableUpload)

Is it normal?

Regards,

Red.

Error / Exception on EWS POST

Hi there,

when I try to test the EWS of my Exchange 2019 I get the following Error:

image

The strange part ist the path in the Stack Trace (I marked it). The path does not exist, as well as the user does not exist.

Here are the complete exception details as text:

Exception details:
Message: Object reference not set to an instance of an object.
Type: System.NullReferenceException
Source: EWSEditor
Stack Trace:
   at EWSEditor.Common.HttpHelper.HtppCall(String sVerb, String sUrl, String sContentType, String sAuthentication, String User, String Password, String Domain, List`1 oHeadersList, WebProxy oWebProxy, String sRequestBody, Int32 iTimeoutSeconds, Boolean bPragmaNoCache, Boolean bTranslateF, Boolean bAllowAutoRedirect, String sUserAgent, String& sRequestHeaders, String& sResult, String& sResponeHeaders, String& sError, String& sResponseStatusCode, Int32& iResponseStatusCodeNumber, String& sResponseStatusDescription) in C:\Users\danba\Documents\GitHub\EwsEditor\EWSEditor\Common\UtilityHelpers\HttpHelpler.cs:line 165
   at EWSEditor.Common.PostForm.DoPostByHttpVerb() in C:\Users\danba\Documents\GitHub\EwsEditor\EWSEditor\Forms\ToolsForms\PostForm.cs:line 446
   at EWSEditor.Common.PostForm.GoRun_Click(Object sender, EventArgs e) in C:\Users\danba\Documents\GitHub\EwsEditor\EWSEditor\Forms\ToolsForms\PostForm.cs:line 124
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Is it a problem of the EWSEditor or how I use it? :-)

Thank you!

BR
Bernhard

Move item brings error message

Hi,
when I try to move an e-mail from one folder to another via the context menu "Move Item..." I get the following error. I tried with the option "Identify folder by unique id" and via selecting the folder via the option "Identify folder by well known name". The folder I wanted to move to was just freshly created. Is this a bug?

Regards

ewseditor error

GCCH/DOD

It looks like this is hard coded to the commercial auth endpoint. Is there any way to configure this to point to DOD/GCCH auth endpoints or have an option to select the different environments.

Error received when attempting GCCH/DOD EWS connections
AADSTS900382: Confidential Client is not supported in Cross Cloud request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.