Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon API > XML API broken with 19.5.1?

nils.petersen@psyma.com

Which Alt-N products do you use?

Most recent posts: nils.petersen@psyma.com

XML API broken with 19.5.1? - 11:58am Nov 20, 2019 CDT - On 19.11.2019 14:31, Keith Personett wrote:

NP>> Trying the alternative logon delimiter '$' now [...] - and back to start... API returns an empty string again, nothing in the log, no XML in MdMgmtWS/ either.
NP>> Shouldn't authentication failures show up somewhere?

The With Info or Debug logging, the XmlApi logs every connection is receives from the ISAPI Host process, so if it is not showing anything in the log, the XMLAPI module is never even being called by the ISAPI Host Process (WorldClient.exe, w3wp.exe, whatever is running that service…).

 

When I get some time, I will look into the php module you referred me to.


Now we're getting somewhere: I've got DSWhiteListReport.ps1 working - it also required
$Url = "https://mail.psyma.com:3002/MdMgmtWS"

If the /API bit is supposed to be a placeholder I didn't get it...

So obviously, the PHP call doesn't work any more, very likely due to the authentication changes that happened in 19.5.1.

I've traced the actual HTTP call from PHP using Wireshark and noticed that the CURLOPT_USERNAME doesn't appear to have any effect...

XML API broken with 19.5.1? - 06:07am Nov 19, 2019 CDT - Hi Keith,

On 14.11.2019 15:10, Keith Personett wrote:
This line….

 

define('MDAPIURL', 'https://{Username}:{Password}@{ServerName}:{Port}/{EntryPoint}');

It appears that you are not sending the domain for the account. Is this account in the primary domain? Do you have full email required for logon set?


Duh - you are absolutely correct, the @mail.psyma.com bit made me miss the domain...

XML API broken with 19.5.1? - 05:29am Nov 19, 2019 CDT - On 14.11.2019 14:54, Keith Personett wrote:

As far as the logging… Ensure that the following are set in MgmtWS.ini in the Data directory

 

[Logs]

LogHasDeviceIdEntries=No

LogHasDeviceTypeEntries=No

LogHasOperationEntries=Yes

LogHasUserEntries=Yes

LogLevel=1


Looks OK - these are the entries here:
[Logs]
HasDeviceIdEntries=No
HasDeviceTypeEntries=No
HasOperationEntries=Yes
HasUserEntries=Yes
LatestLogFile=D:\MDAEMON\LOGS\MdMgmtWS-2019-10-21.log
LogFilePrefix=MdMgmtWS
LogHasDeviceIdEntries=No
LogHasDeviceTypeEntries=No
LogHasOperationEntries=Yes
LogHasUserEntries=Yes
LogLevel=5

The leading lines Has... are legacy entries?

NP>> I think that's for ActiveSync - did anything else change as well?

 

That change affected 4 ISAPI modules, MdMgmtWS, MdAirSync, MdAutoDiscover and Mddp

 

Easiest way to verify that the API is being loaded and functioning is to just bring up the help portal by opening your browser and navigate to http[s]/{ServerName}:{Port}/{EntryUrl}

( on my main test server, for instance, https://marvel.int:444/API )


Seems that's the problem - loading https://mail.psyma.com:3002/API just results in

Not Found


Loading https://mail.psyma.com:3002/MdMgmtWS?Operation=Help does work btw.

I think I've mentioned that I tried reinstalling 19.5.1 on top (suspecting something of the kind), but that didn't change anything.

I don’t have a way to test php code… I generally test with Javascript, Powershell and C++. All of my tests with 19.5.0, 19.5.1 and 19.5.2 (internal) succeed.


You could just download and extract the current PHP 7.3 package for Windows, uncomment the line in php.ini
extension=php_curl.dll
and php snippet.php should run the script snippet.

Can you call the XML API on 19.5.1 with anything and get a result? Do you have any test code I can run here?

Best!
Nils

--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API...

XML API broken with 19.5.1? - 06:17am Nov 22, 2019 CDT - On 21.11.2019 17:30, Keith Personett wrote:

The API likely stopped working due to the authentication fix combined with a lack of proper credentials.

 

I would expect that the 404 from the wrong URL would typically show up in the WDaemon log, but that is not one of the modules I work on primarily, so I am not sure about which log it would go to.


WDaemon.log shows a bunch of AS errors with the update,
Tue 2019-11-05 20:37:07.476: Could not initialize ISAPI DLL d:\mdaemon\worldclient\html\mdairsync.dll
(I rebooted the server after the update and that error vanished)
but there's nothing related with the XML API, neither with 19.5.0 (where it was still working) nor with 19.5.1 (where it stopped).

Hmm...
Nils

--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion...

XML API broken with 19.5.1? - 03:08am Nov 21, 2019 CDT - On 20.11.2019 18:04, Keith Personett wrote:

I’ll look into the logging, but I believe that in those cases where you were not seeing log entries, it was likely hitting the wrong URL, so the xmlapi was never called. Which means it never had anything to log.


Actually, the API stopped working and the log stopped showing anything simultaneously after the 19.5.1 update. Only later I tried the samples with the wrong URL - shouldn't that show up somewhere as well, like in WDaemon.log or so?

Best
Nils

From: md-api@mdaemon.com [mailto:md-api@mdaemon.com] On Behalf Of Nils Petersen (nils.petersen@psyma.com)
Sent: Wednesday, November 20, 2019 10:59 AM
To: md-api List Member <md-api@mdaemon.com>
Subject: [md-api] XML API broken with 19.5.1?

 

On 19.11.2019 14:31, Keith Personett wrote:

NP>> Trying the alternative logon delimiter '$' now [...] - and back to start...

OK


You are visiting as a Guest user.