EAS MD Available On GitHub

I promised in my last post that EAS MD would be open sourced, and available for those who want to tinker with it or build their own utilities based on what I have done.

I’ve managed to sort this out now, and if you head on over to GitHub it should be available for your viewing pleasure:

I’ve upgraded the solution to .Net framework 4.5.1 in the process. Not a big change in itself, but at least it saves you from installing an older version of .Net if you´re running a new Windows version. I have not upgraded it in the sense of rewriting code to use HttpClient instead of HttpWebRequest, and other new "stuff". (It would for instance make sense to go async/await to unblock the UI as well.)

While it´s not something you´re likely to notice I also replaced the WBXML bits with the one I´m using for the EAS Web project (https://easweb.codeplex.com)

Since I considered this to be a shift from the regular updates, (actually irregular is probably a better word since I haven´t updated it for a long time), I bumped the version number all the way to 2.0.

I have a web version of EAS MD as well currently burning cpu cycles over at https://easmd.labs.mobilitydojo.net, and this obviously shares some code with the desktop version. I have however not included this in the repo. It´s not that a web implementation wouldn’t add value, but the current version is hopelessly outdated so I think that it would be cleaner to just rewrite the whole web thing if a non-desktop version is needed.

There are certainly things that can be improved upon from the current version:
– The autodiscover feature doesn’t follow redirects, so for instance testing a mailbox located in Office 365 might give you a PASS, but not inform you of the "final" address since Office 365 relies on multiple queries for this.
– The WBXML utility isn’t exactly easy to work with, nor is it fully featured. I´m not sure whether this should be pursued further, or abandoned as a feature.
– Making the output from the test more readable. I can´t even remember exactly why Base64 and Hex are options as they don´t really make much sense. (Hex has been hidden for a long time, and not present during runtime. The Base64 option is flipped off now too, but the code is still there.) The binary output can be used for some obscure scenarios, but decoded WBXML probably is the best.

Anyways, it’s all available now so if anyone feels inspired they´re free to do as they like. The code is licensed under GPLv2, and you are welcome to contribute if you come up with a killer feature.

Open-sourcing EAS MD

I get email requests every now and then about the inner workings of my EAS MD utility, and if the source is available. Of course the source code is technically speaking available to me, but I’ve never made it public. It’s not that I’ve hidden any dark secrets in it, or the code is so magical that I need to keep it to myself. I’ve tried to help people with their Exchange-related issues, and I have no problems sharing code fragments, but the whole Visual Studio solution ready for compilation has never left my "datacenter".

The response I’ve given so far is a variant of "it’s on my backlog of things to do". Which sounds like a lame excuse for "can’t be bothered"…

Well, I guess I have to force myself into another mode, and move it closer to the top of the list 🙂

So, my intent is to actually go open-source with it in the near future. I’ll be pushing it to GitHub as soon as I’ve cleaned up it up a little. The code isn’t that awful (I hope), but I should probably do things like upgrading the .Net version of it as well.

This means you can’t download it right now, but it will be available on this address soon: https://github.com/ahelland/EASMD

ADAL and Web Authentication Broker on Windows Phone 8.1

One of the components I highlighted as an improvement to the MDM enrollment process in Windows Phone 8.1 was support for Web Authentication Broker (WAB):

Which itself was “ripped” from the Windows 8.1 bits:

At any rate; it is a nice way to hook into Azure Active Directory, and by extension your on-prem AD as well if you’re doing DirSync. (Or ADFS if you are so inclined.) What I used in the MDM process was the .Net server side implementation suitable for browsers.

Unfortunately using WAB natively in Windows Phone was not as easy. Yes, the WAB component is present in the operating system, but it requires some effort to get started with nonetheless. Active Directory Authentication Library, or ADAL for short, was/is the package responsible for making AD integration easier in .Net server side and now it’s finally present for Windows Phone 8.1 as well. Now you can easily use AD as your authentication in your Windows Phone app without problems, without VPN/reverse proxying and all that stuff. Just include the necessary NuGet package in your VS solution and you’re almost there. (Yes, you still need to write some code yourself.)

The funny thing is that this library was available for iOS and Android before Windows Phone even though Active Directory is just about as Microsoft as you get technology wise, but now you should be golden whatever your mobile preference is Smilefjes

Usually I’d whip up some code for you to try this, but in this case I will let the work already done by Vittorio Bertocci illustrate the moving parts instead. There’s a nice code sample over on the official AzureAD GitHub page:

Not to mention a blog post with some more details:

Short post, I know, but useful little trick I hope.