fuel9 / DisplayMonkey

Display Monkey digital signage solution
Other
126 stars 50 forks source link

'Access Denied' when connecting to exchange account #176

Open CommanderGizmo opened 4 years ago

CommanderGizmo commented 4 years ago

We are using Office365 exchange cloud services and DM 1.6.1.189. When I attempt to add a connection to our exchange services I get a red 'Access Denied' next to the user name field, exhibiting the same behavior if the password is entered correctly or I just type random characters. No trace is generated and the page returns the error instantly.

However, if I enter no password at all I get this trace:

'''

HTTP/1.1 401 Unauthorized request-id: 322635b4-cc9d-49b0-acaf-60ecd37dbef2 X-CalculatedFETarget: BN6PR17CU002.internal.outlook.com X-BackEndHttpStatus: 401,401 X-FEProxyInfo: BN6PR17CA0046.NAMPRD17.PROD.OUTLOOK.COM X-CalculatedBETarget: BN6PR12MB1121.namprd12.prod.outlook.com X-RUM-Validated: 1 X-BeSku: Gen9 X-DiagInfo: BN6PR12MB1121 X-BEServer: BN6PR12MB1121 X-Proxy-RoutingCorrectness: 1 X-Proxy-BackendServerStatus: 401 X-FEServer: BN6PR17CA0046,SN1PR12CA0053 Content-Length: 0 Date: Thu, 05 Mar 2020 21:42:41 GMT Set-Cookie: exchangecookie=8f8bcc7d61ab4df9a04cee700abb30a0; expires=Fri, 05-Mar-2021 21:42:36 GMT; path=/; secure; HttpOnly Server: Microsoft-IIS/10.0 WWW-Authenticate: Basic Realm="" X-Powered-By: ASP.NET

'''

I am using the default ews url of https://outlook.office365.com/EWS/Exchange.asmx (which should be correct in our case). Following the URL and using copy and paste to enter the same username and password used to try and link the exchange service to DM returns a page showing a successful service creation. This indicates the credentials are valid and the service is available.

Please advise what is causing this 'Access Denied' error without any trace generated so I can guess at what direction to go in next.

Thanks!

CommanderGizmo commented 4 years ago

A followup: I was able to get this to work by downloading the source code and running the app from visual studio using the current deployed installed SQL database. Creating the connection to exchange and viewing the calendar works just fine in Visual Studio in both debug and release builds.

Publishing the project and overwriting the files on the deployed install exhibits the same issue: "Access Denied" when trying to update the connection or create a new one, and

''' Error: Server error
Where: Outlook::callBack::onSuccess
When: 2020-03-12T16:13:29-05:00
Info: {Error:Access is denied.\r\n,Data:{FrameId:15,PanelId:4,DisplayId:1,Culture:en-US}}

'''

when attempting to view the panel. Keep in mind that both the deployed install and the visual studio launched one are using the exact same (copied and pasted) database connection string. This suggests it's something wrong with the IIS install, but I can't guess as to what. Once again, no traces are generated for this error. I'm not sure what access is denied to, but it seems like it's something within IIS since it isn't apparently attempting a EWS conncection before erroring out.

Any ideas I can try?

JA4N commented 4 years ago

@CommanderGizmo did you solve the problem?

I have the same issue. Every time i want to create a new Outlook connection I get a red error next to the E-Mail field which says "Access denied". I have switched off my proxy and my firewall but i still get the error message. I´m using Display Monkey in a VM with a SQL Server 2012 and an IIS version 1903 (Build 18362.778). I thought that it´s something wrong with the Code, so I downloaded the Source Code and run it in VS19 (debug and release build), same error. Maybe it´s someting wrong with the implemented EWS-API? If I enter the EWS-URL in the Browser the service is working, so no internet issue.