Configuring Office 365 Mobile Device Management on Android

In a previous post I talked about the admin tasks required in setting up Mobile Device Management in Office 365, in this post I look at the end user experience on Android.

During this testing I’m using an Android device running version 5.1.1 and I’m using Microsoft’s Outlook App rather than the built in mail client.

Upon opening the app for the first time I’m presented with the usual login box

mdm-client1

Because I’ve already turned on MFA on my account I get prompted to authorise the app (I strongly encourage everyone to have Multi-Factor Authentication turned on wherever it is available)

mdm-client2

Once authenticated I’m prompted to Enrol my device before I can continue

mdm-client3

After clicking Enrol my browser opens and I’m told I need the Intune app, which is available from the Play store

mdm-client4

The app is a small download

mdm-client5

It needs access to the device and lists its requirements as:

mdm-client6

After installation and opening the app we’re presented with another Sign In prompt.

mdm-client7

After signing in we get the option to enrol the device, it’s still not too late!

mdm-client8

One last confirmation of what we are going to allow it to do.

mdm-client9

Now the device goes through the enrollment process

mdm-client10

We’re prompted to name the certificate that’s installed, I chose to leave mine the default

mdm-client11

We’re then greeted with the Intune application page

mdm-client12

On the My Devices tab we can see the enrolled device

mdm-client13

To check the details and compliance information you can click on the system generated device name to bring it up

mdm-client14

You can change the device name by clicking on the pencil icon to make it something more recognisable.

mdm-client15

From an admin perspective we can now see the device in the portal and are able to wipe if need be.

mdm-client16

Mobile Device Management in Office 365

Managing mobile devices and securing your endpoints is an important task, there are many MDM solutions out there, including Microsoft’s own InTune. But what if you’re a small company? Well if you’re using Office 365 then you can take advantage of the Mobile Device Management for Office 365 feature to provide basic MDM features such as ensuring devices connecting aren’t Jailbroken, have a device password set and allow remote wipe.

In this post I’ll walk through the administrative steps required to get the tenant ready for MDM and how to apply it to users

So, we browse to the Mobile Management section within the Office 365 portal and we are greeted with:

mdm1

After clicking Let’s get started and once the Microsoft automation tasks have completed and MDM is ready we are greeted with:

mdm2

First thing is to complete the settings and remove the error

To configure the tenant domain(s) you need to add two new cname records as per http://go.microsoft.com/fwlink/p/?linkId=525583

mdm3

mdm4

Now, if you’re not going to have Apple devices then you can, as it says skip that configuration.

After clicking on Set up, we have to download the CSR from our account

mdm5

Next we have to browse to the Apple Portal

mdm6

Sign in with an Apple Account (ensuring it’s an account that isn’t tied to a specific user so can continue to be used as the certificates will need renewing)

mdm7

Click on Create a Certificate

mdm8

Accept the Terms of Use to continue

mdm9

Use the Choose File button to browse and select the CSR file generated earlier.

mdm10

Once processed use the download button to download the PEM response file

 mdm11

You can close out the Apple website and upload the PEM file.

mdm12

Now we have a nice green tick to say we’re set up

mdm13

Now we need to create polices that can be applied to users, the first step of which is to ensure we have a group in Office 365 that we can apply the policy to

mdm14

After ensuring our groups are created we can create our Device Management policies.

mdm15

We give the policy a name

mdm16

Now you can choose the policy options

mdm17

Then some additional options

mdm18

Next, we have the option to just save the policy, but doing so will not apply it or we can apply the policy straight away

mdm19

Now we can browse to the group(s) we created earlier and add them

mdm20

Once the group(s) are added we can continue

mdm21

We are given a summary of the policy

mdm22

Back in the portal we can see that the policy has been created and that it is being turned on

mdm23

After a little while we can see that its status has been set to on

mdm24

Now it is just a case of assigning users to the group and they will get the policy assigned. I hope to cover the client experience in another post

Adding Exchange ICS files via Outlook on the Web (Office 365 OWA)

I often access my Exchange Online mailbox via my browser when working from home rather than firing up the Outlook client on the work laptop and recently had cause to add an appointment that was in an ICS file to my calendar.

Now this didn’t used to be possible via OWA but I’ve discovered it now is, by going New > Add calendar > from file:

open calendar

then browsing to the file in question

add calendar file

and then clicking on save, and low and behold, the appointments in my calendar, no full fat client required!

Not sure how long the feature has been there for but I’m glad it has been added.

Exchange Hybrid Free/Busy and Proxy issue

I was investigating an issue with a customer’s deployment where their on-premise Exchange users couldn’t see the free/busy information of the pilot users in Office 365.

After looking through the logs on all of their servers I found event id 4002 on one of them:

exchange 4002 tmg error

So, the EWS request was being blocked by an authenticating proxy, in their case TMG.

After a little investigation on the TMG it was identified that their default web filtering policy was restricted to Authenticated Users and as this request was coming as the Exchange server account itself it was being denied.

Now, they already had a policy in place on the TMG with a set of addresses that could by-pass the authentication and go straight out, so simply adding *.office365.com to this list allowed Exchange to connect to the EWS of Office 365 and get the free/busy information.

Clients were now working as expected and all should have been good, however the Exchange servers should have had direct internet access and shouldn’t have been trying to go through the proxy in the first place. The customer wanted to know why, so I had to get it to work without entering the url in the by-pass list.

I tried disabling the proxy options within my Internet Explorer settings on the Exchange servers and confirmed I was able to get out onto the internet without going through the proxy. Now, why wasn’t the Exchange server itself able to do this?

I set about trying to work out how to run Internet Explorer as the system account, but how do to do this? Well the answer was to use psexec from the sysinternal tools (available from: https://technet.microsoft.com/en-us/sysinternals/bb545027)

I started on the server that had generated the error, the command I needed was:

psexec.exe -is "c:\program files\internet explorer\iexplore.exe"

the switch -is set the program to run as the system and in interactive mode (without the i you’d not see the browser window as I found on first attempt)

Upon opening the Internet Settings in the newly viewable browser window I discovered that there were proxy settings enabled. Disabling these options allowed free/busy to work, interesting!

I ran the same test on the other Exchange servers but none of them had proxy information entered. Strange.

Until I came across: http://blogs.msdn.com/b/askie/archive/2013/05/09/user-proxy-settings-showing-up-in-local-system-account-correct-way-to-apply-proxy-settings.aspx  which talked about how Group Policy settings, if not correctly configured could result in what I was seeing.

So I had a check, all Exchange servers had the same policy applied specifying the Internet Explorer proxy options but it was set to “Authenticated users” only, which shouldn’t include the service and system accounts that Exchange was running under.

But on the server that was reporting this error I did find proxy information located in the registry key: HKEY_USERS\.DEFAULT. \Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections and after I replaced this with the blank key from another server everything worked and Exchange was no longer going through the proxy.

Not having access to their GPO I wasn’t able to confirm its configuration but I suspect it was changed at some point but the server in question had already applied the incorrect settings which are not superseded by the correct configuration.

So the lesson here is, check GPO and the registry for proxy settings and ensure that Exchange servers (and clients) do not go through a proxy when trying to reach Office 365 services and if they must, ensure that it does not require authentication for the Office 365 addresses.

Microsoft does call this out on their Office 365 URL and IP address webpage – https://support.office.com/en-us/article/Office-365-URLs-and-IP-address-ranges-8548a211-3fe7-47cb-abb1-355ea5aa88a2