ADFS behind Websense or Bluecoat causes CRL check to fail

Scenario: You configure a relying party trust in ADFS for SSO. ADFS event logs show this error: “The encryption certificate of the relying part trust … is not valid. It might indicate that the certificate has been revoked, expired, or that the certificate chain is not trusted.”

image

After verifying that the certificate chain is valid the next thing to check is whether the ADFS server can make an outbound port 80 call to the HTTP path defined in the relying part trust’s SSL certificate for the Certificate Revocation List (CRL).

The easiest thing to do is browse to the internet from the ADFS server to make sure outbound port 80 is open.

But if the ADFS server sits behind a proxy server, then the winhttp service will not automatically inherit the proxy server settings from Internet Explorer.

You can configure the winhttp service to use the proxy server. Run this on the ADFS server in an elevated CMD session:

netsh winhttp import proxy source=ie

https://social.technet.microsoft.com/Forums/windowsserver/en-US/47345c69-7b68-4f09-907e-43ed2805cac0/adfs-30-signing-certificate-crl-check-with-http-proxy-to-the-internet?forum=Geneva

The above article also says you can disable ADFS from performing a CRL check, but this should only be used for troubleshooting, because CRL checking is a good idea for security (what if the certificate was compromised?).
Set-AdfsClaimsProviderTrust -TargetName “<IDP name>” -SigningCertificateRevocationCheck None

What I learned at the Microsoft Ignite Conference (Chicago 2015)

The 2015 Microsoft Ignite Conference (May 4 – 8) was held in Chicago and included over 1,000 sessions on a range of Microsoft technologies.  The conference sessions and focused intent seemed to me to be predominately focused on the new “Cloud First” and “Mobile First” mission statement for Microsoft.

Historically, Microsoft uses events like Ignite to announce new products and features, so it is always an exciting time for IT Pro’s and customers alike.

I was fortunate enough to attend several of the sessions on Azure and Office 365, and I’m eager to share some of the highlights here. This is not intended to be an exhaustive or comprehensive list of what was unveiled, but rather, just my own individual experience and take-aways. I plan on watching several sessions that I missed – and you can too (see ‘Catching Up’ at the bottom of this blog post). 

For Julia White’s (General Manager of O365 Marketing) overview of Ignite, I recommend reading her blog post (here). Jennifer Marsman also wrote a great recap of the Build conference (here).

Azure Stack

Azure Stack is the private cloud version of what is known as Azure today. There was some initial confusion at the conference on whether this was a replacement for Azure Pack. When I spoke to the product managers at Microsoft, they said if customers are happy with their existing Azure Pack, that’s great, keep using it. But for those customers who want the same exact code as what is running in the Public Cloud, then Azure Stack is for them. Azure Pack relied upon System Center whereas Azure Stack will not. I would not be too shocked if Azure Pack is shelved because there appears to be clear overlap between these two private cloud offerings.

Azure Stack is scheduled for GA in H2 2015. When Azure Stack is released, it will not have all 48+ of the features in the public version of Azure, but it will have Compute and a few others.

Azure

  • Azure now has datacenters in more locations than Google and AWS combined
  • Venkat Gattamneni posted that Azure shines bright at Ignite! that “…in the last 12 months, we’re proud to have added over 500 features and services to the platform.”
  • Azure Resource Manager will allow you to deploy Gallery templates to both Azure Stack and Azure IaaS Public Cloud.
    In his blog post, Corey Sanders goes into lots of detail about ARM, templates etc. He says “This new template language will enable you to easily stitch together VMs, Virtual Networks, Storage Accounts, NICs, Load-balancers, and other PaaS services, like App Service and SQL Databases, in a single coherent application model.”
    The construction of a .JSON file is all that is required. Azure Resource Manager enables you to build and manage large scale applications in an agile and repeatable manner. Complex networking infrastructures can now be composed using simple JSON templates. Azure Resource Manager enables additional capabilities such as Role Based Access Control (RBAC), tagging of resources, and advanced auditing for resource usage. The significant change that ARM introduces is that when creating a VM in ARM mode, there is no dependency upon a cloud service. This enables ARM to spin up thousands of VM’s without the previous limitation that a cloud service imposed on a VM. For example, previously you could only deploy 50 virtual machines in a cloud service. So now, with a .JSON file, you can spin up 100 VM’s without the limitation of a cloud service holding you back.
  • DNS as a Service.  Think GTM (Global Traffic Management) in the Cloud. Azure DNS uses anycast networking, so that each DNS query is answered by the closest available DNS server. The only drawback is there is no GUI interface (yet) – just PowerShell management for now.  50 cents per DNS zone and 20 cents per million DNS queries.
  • Azure Cloud Service now supports multiple VIP’s
  • Several security enhancements: Host Guardian Service, Virtual Secure Mode, and Shielded VM: This is a virtualized vTPM module to support the encryption of guest virtual machines. Requires TPM 2.0.
  • Several network enhancements, ex: User defined routes, IP Forwarding, Floating Nics, ExpressRoute Premium Add-on. This add-on enables up to 10,000 BGP routes. Once your traffic enters an ExpressRoute meet-me site, you can reach ANY Azure region across the globe. Reserved IP addresses can now be moved between services. This supports scenarios where you want to quickly move an external IP between VMs.
  • Azure VPN gateway now supports Site-to-Site VPN and ExpressRoute coexistence.
    For additional details: http://azure.microsoft.com/blog/2015/05/05/new-networking-capabilities-for-a-consistent-connected-and-hybrid-cloud/
  • I learned that the Azure AD Proxy connector supports multiple connectors for automatic load balancing. On the roadmap is the ability to pin a particular app to a connector.
  • Azure Data Lake is “A hyper scale repository for big data analytic workloads.” See “What’s a Data Lake?” And check out Introducing Azure Data Lake for more info and to sign up to get notified when a preview is available. You might also watch this 3 minute video.
  • The public preview of client-side encryption in the Azure Storage client library for .NET. You can use client-side encryption to encrypt blob data, table data (you select the properties to encrypt), and queue messages. Client-side encryption also integrates with Azure Key Vault and allows for integrating with other key management systems if you prefer. client-side encryption blog post
  • Import/Export now also supports up to 6 TB hard drives. Click (here) for more information.
  • Azure Site Recovery enables customers to deploy application-aware availability on demand solutions. Azure Site Recovery solutions have been tested and are now supported for SharePoint, Dynamics AX, Exchange 2013, Remote Desktop Services, SQL Server, IIS applications and System Center family like Operations Manager. Read all the details in Abhishek Agrawal’s blog post
  • The Cloud Application Discovery feature is now Generally Available and integrated into the Azure preview portal. This tool can help identify ‘shadow IT’ where users are using 3rd party SaaS apps like DropBox without letting IT know about it. You get started by adding “Azure AD Cloud App Discovery” in the new Azure portal. You must first have an Azure AD Premium license assigned before you can use this tool. Cloud App Discovery enables you to:
    • Discover cloud applications in use within your organization
    • Identify which users in your organization are using an application
    • Export data so you can analyze it offline in other tools
    • Prioritize applications to bring under IT control, with single sign-on and user management.

Office 365

  • Equinix, AT&T, and BT will be the first MPLS carriers to enable connectivity between Office 365 and on-premises network (coming) Q3 2015. This enables end-to-end QoS which is particularly helpful when considering the Skype for Business Online (Formerly Lync Online) capabilities coming in September that will enable PSTN (dial tone) for outbound and inbound enterprise voice phone calls in the Cloud.
  • Sway is now part of Office 365. See this blog post for more information.

  • Office Delve organizational analytics. Provides an interactive dashboard for teams and individuals to identify key trends across employee engagement, team connections and even views like work life balance

  • Significant improvements in Office 365 Video management are coming. Admins will have the ability to remove or manage posted videos. Ability to share externally is coming too.

  • Significant improvements in Office 365 Groups management are coming (naming conventions, etc). A mobile app for Groups is coming.

  • Riverbed WAN optimization appliances can de-dupe Exchange Online traffic and SharePoint Online traffic by having your internal CA issue a certificate to masquerade as Outlook.com or Sharepoint.com. 90% traffic reduction in Exchange Online traffic! Downloading a 20 megabyte file from SharePoint Online would normally take ~60 seconds whereas with Riverbed it is 33x faster.

  • There is a new compliance center for Office 365 coming that will allow you to create one DLP policy that will then apply to SharePoint Online, OneDrive, Exchange and also the Office 2016 clients. For example, you can be in an Excel worksheet and type in a credit card number and you will get a policy tip notification that it is a violation of policy to have credit card data in Excel. Interesting!

  • There is a new Knowledge Management Portal for Office 365. Delve Boards are the building blocks. “Add to board” button will be added everywhere throughout Office 365.

  • This doesn’t belong in this category, but SharePoint 2010 farms will not have a direct upgrade path to SharePoint 2016. They will have to be upgraded to 2013 first (double-hop migration).

  • Modern Authentication for Office 2013 clients. http://channel9.msdn.com/Events/Ignite/2015/BRK3136

Exchange 2016

  • Architecture. CAS Role goes away. http://blogs.technet.com/b/exchange/archive/2015/05/05/exchange-server-2016-architecture.aspx
  • Deploying 2016
  • Exchange Server is now supported in Azure IaaS on Azure premium storage. Why anyone would do this… is for another blog post.
  • OAUTH now has a wizard in Exchange 2013 and 2016. This enables cross-premises Discovery and MRM. Also, cross-premises free/busy will attempt to use OAUTH first before the MSFT Federation Gateway, so it is a good idea to use OAUTH when possible. Why not?

Skype for Business

  • Broadcast Meetings up to 10,000 participants (up from 250 in Lync Online)
  • IIS ARR servers can be configured for Edge Caching – this enables users to view the skype broadcast meeting from the local cache rather than hammering the internet egress.
  • Call Quality Dashboard is available for download. Offers aggregated call quality information for on-premise deployments. In addition to a set of system reports that will be created as part of the install to help you view and diagnose network infrastructure issues affecting call quality, you will also be able to quickly and easily create additional reports tailored to your needs.
    http://www.microsoft.com/en-us/download/details.aspx?id=46916
  • To get the new Skype directory to appear, you need to remove the previously configured Skype Public Provider.
    See this article for more information: Enabling Skype Federation with Skype for Business Server or Skype for Business Online

Microsoft Operations Management Suite (OMS)

  • Click (here) for more details.
  • Includes Security Threat Analysis

Windows 10

  • Cortana is connected to PowerBI in the Windows 10 start menu

  • Device Guard in Windows 10

  • Windows Update for Business

Devops

Nano server is a tiny version of Windows Server.  Remember Windows Server Core? It’s like that but is 20x times smaller, hence the name “Nano.” In the demo I saw, the whole server consumed only 128 MB of Ram, and only 500 MB of hard disk space. Wow! From what I can tell, it is only managed externally through WMI or PowerShell, so there is no GUI or security logon inside of it.

Windows Nano Server was previously announced in April, but there were several more sessions on it at Ignite. Nano Server is best understood in the context of DevOps and the containerization of Docker. From what I can tell, Nano has little use outside of a development strategy that includes containerization (aka Docker).

Catching Up

All the ignite sessions and PPT presentations are available at Channel9 and here.

Vlad Catrinescu (MVP) posted a powershell script on Technet that allows you to download all the Ignite Videos and presentations. Or if you don’t have 300GB of disk space, you can also create a filter to just download the content you want, ex:

.\downloadignitevideosandslidesv4.ps1 -keyword “SharePoint,Azure,System Center
https://gallery.technet.microsoft.com/all-the-Ignite-Videos-and-b952f5ac

Read my LinkedIN post “Suggestions for staying on top of technology trends

Random Insights

Reviewing Office 365’s MDM Capabilities

Exchange and Exchange Online have had decent mobile management capabilities through ActiveSync policies prior to the March 30th 2015 announcement of new MDM capabilities for Office 365.  For example, using Activesync you could require a pin to unlock a smartphone after a period of inactivity, wipe a device, and a few other options. You could automatically quarantine new devices that attempted to connect to ActiveSync.

This blog post is a review of the newly announced MDM capabilities in O365.

  • Conditional Access—You can set up security policies on devices that connect to Office 365 to ensure that Office 365 corporate email and documents can be accessed only on phones and tablets that are managed by your company and are compliant. Behind the scenes, Office 365 leverages Microsoft Intune and the Microsoft Azure Active Directory to deliver this capability. The Conditional Access policies apply to Office applications such as Word, Excel, PowerPoint and other business applications—making management easier for admins while ensuring users can securely work with their preferred productivity applications.
  • Device management—You can set and manage security policies such as device-level pin lock and jailbreak detection to help prevent unauthorized users from accessing corporate email and data on a device when it is lost or stolen. Additional settings and rich reporting are also available within the Office 365 admin center so you can gain critical insights about devices accessing your corporate data.
  • Selective wipe—You can easily remove Office 365 company data from an employee’s device while leaving their personal data in place. This is an increasingly important requirement as more businesses adopt a “bring your own device” (BYOD) approach to phones and tablets.

Requirements

You can use MDM for Office 365 to manage many types of mobile devices like Windows Phone 8.1, Android version 4+, iOS devices running version 6+.  Management of BlackBerry devices isn’t supported by Mobile Device Management for Office 365, but you can still use the free BlackBerry Business Cloud Services (BBCS) from BlackBerry to manage BlackBerry devices.

To manage mobile devices used by people in your organization, each person must have an applicable Office 365 license and their device must be enrolled in MDM for Office 365.

How it works

The following diagram shows what happens when a user with a new device signs in to an app that supports access control with MDM for Office 365. The user is blocked from accessing Office 365 resources in the app until they enroll their device.

Policies and access rules created in MDM for Office 365 will override Exchange ActiveSync mobile device mailbox policies and device access rules created in the Exchange admin center.

image

Getting Started

You first need to Activate MDM for your Office 365 Tenant. As of 4/17/2015 – this has not been rolled out to all tenants. You’ll know when your tenant has this capability when you are able to go to Office 365 admin center > Mobile Devices, and then select Get started to kick off the activation process. It may take some time before the service is ready. When it’s done, you’ll see the new Mobile Device Management for Office 365 page.

Update: As of 5/20/15, MDM is starting to appear in Office 365 tenants. Check out Sean McNeil’s blog posts on this topic for a walkthrough:

office365evangelist.com/?p=2487 and office365evangelist.com/?p=2502

Want More?

Microsoft Intune, part of the Microsoft Enterprise Mobility Suite, provides additional capabilities including the ability to restrict the cut, copy, paste and save as functions in the Office Mobile and OneDrive for Business applications.

Intune also provides the ability to provision and manage certificates, Wi-Fi, VPN (device and app-specific), and email profiles automatically for devices that enroll, enabling users to access corporate resources with the appropriate security configurations.

 

Management Capabilities

The Office 365 MDM management capabilities include the following:

  • Wipe an entire device or Selectively wipe Corporate Data while leaving personal data intact
  • Block unsupported devices from accessing Exchange email using Exchange ActiveSync
  • Configure device policies like mobile device password requirements and security settingsView list of blocked devices
  • View what policies have been applied to a device
  • Unblock noncompliant or unsupported device for a user or group of users
  • Generate detailed report to see devices that are not compliant

Summary

The new Office 365 MDM capabilities allow you to manage the “Office Mobile”, “OneDrive for Business” and Exchange Activesync features by requiring a device to be enrolled and compliant with policies.

References:
Overview built-in Mobile Device Management for Office 365

Choose between Microsoft Intune and Built-in MDM for Office 365

Dirsync soft matching vs hard matching

I recently was asked to advise on how cloud identities can be converted to federated identities such that when Azure AD Connect is run for the first time, the on-premises Active Directory takes over as the source of authority. The benefit of doing this is the user would have a single username and password, eliminating the need to have a different password for Office 365 when they already have one for Active Directory. This becomes complicated when an existing tenant exists and users have adopted various things like Teams. In my experience, a license bundle is assigned to the user which includes an Exchange Online license, which then creates a mailbox in the cloud, when the user already has one on-premises.

So how do we merge identities between Active Directory and Azure AD? In some cases, Azure AD will automatically match things (this is known as soft match).  However, when attributes do not line up then what ends up happening is a duplicate account gets created during the first synchronization. This is preventable through a technique known as hard matching, where we force the two objects to merge during the first synchronization.

Azure AD Connect will attempt a soft match if the primary email address attribute exists on both sides AND (the immutable ID matches the ObjectGUID on-premises OR the cloud immutableID is empty) <- see note below for an explanation why this matters. This is best documented on MS KB 2641663 and on Stephanie Kahlam’s blog (here).

However, what if the cloud identity is not enabled for Exchange Online? In that case, there is no primary address for a cloud identity to use for soft matching. For example, if the user was only configured for CRM Online or another O365 service. You could then make the UPN the same on both sides, Azure AD Connect will soft match on UPN too. This is explained in Microsoft documentation (here). This is performed in Windows Azure Powershell for Office 365 with this command:
Set-MsolUserPrincipalName -UserPrincipalName [email protected] -NewUserPrincipalName [email protected]

In scenarios where neither of those options work, then the only remaining option is to either blow away the cloud account or force the cloud account to use the same Immutable ID as the on-premises AD ObjectGUID (after it is converted into the proper format). This is known as a “hard match.”

In one case, I don’t know why, I had to make the UPN match on both sides, and the hard match too, otherwise I found a duplicate object was getting created in the cloud.

Hard Match “How TO”

To update the immutableID value of the Office365 object to match the on-prem ObjectGUID, you use the get-Aduser powershell command (this is installed on most Domain Controllers and can be installed on member servers). The format of the ObjectGUID must be converted to Base64. You can download the script I use to perform this (here).

Then once you get the ObjectGUID converted, you can run this in Azure AD PowerShell to perform the hard match:
install-module msonline
connect-msolservice
Set-MsolUser -UserPrincipalName [email protected] -ImmutableId RDHiRneDPkiofrZ2nbYu7Q==

Then force Azure AD Connect to run and that should convert the cloud identity to be sourced from on-premises Active Directory.

If the cloud identity ever pre-existed from a previous synced existence (for example, if prior to an ADMT migration, if the account originated from a separate AD forest than where the account exists presently) then soft match will never work – it will throw a bogus error about duplicate proxy addresses in the MIIS GUI. The only solution is to hard match by updating the cloud identity with the new on-prem ObjectGUID (following conversion from the steps above]

Another tip: if the account was being used heavily for Teams, SharePoint, OneDrive, PowerBI, or other cloud workloads, you may want to only remove the Exchange license, however, that still leaves the MailboxGUID from the account left on the object. The only way to clear that from the cloud user is to connect to Exchange Online PowerShell and run this command:

install-module exchangeonlinemanagement
connect-exchangeonline

Set-User [email protected]PermanentlyClearPreviousMailboxInfo

Converting distribution groups to the new Office 365 “Groups”

In a previous blog post, I wrote about the value of the new Office 365 “Groups.” These are a next generation type of group that replaces the function of a traditional distribution group, and includes the benefits of a security group, along with many other rich collaboration experiences. For example, they offer a shared calendar, shared files via OneDrive, shared OneNote, and a group chat experience in OWA. You can use these groups for Azure AD SSO, and the new March preview of AAD-Connect will dirsync these groups to on-premises.

See: Office 365 “Groups” are next generation distribution lists
and Upgrading Dirsync to Azure Active Directory Connect Public Preview – March 2015 update

I was inspired to write this post after reading my colleague’s post on how to update the primary SMTP address: http://blog.ucparticles.com/2014/11/office-365-groups-how-to-update-primary.html

Basically, when a new “Office 365 Group” is created, it gets stamped with an MyTenant.onmicrosoft.com address, for example: [email protected]

In Keif’s blog post above, he demonstrates how to use Exchange Online remote powershell to update the address to match the vanity domain name, ex: [email protected]. This improves aesthetics and mail routing.

  • Obtain a list of existing Office 365 Group mailboxes

      Get-GroupMailbox

      • Use the following one-liner to update the primary SMTP address

          Set-GroupMailbox –Identity Name PrimarySMTPAddress groupname@defaultdomain.com (Insert primary domain here)

        Keif also posted a powershell script to read from a CSV file and convert the groups to the new SMTP format. Awesome!

        So this solves one part of the conversion, which is to get the groups to use the shorter SMTP domain format.

        What about the overall process itself? Let’s say you have 100 distribution groups today and you want to convert them all to Office 365 Groups? How would you go about doing this?

        Approach #1 – Create a new O365 Group and then add the existing DL as a ‘member’

        Approach #2 – Create a new O365 Group and then delete the old DL. Inform users to start using the new Group.

        Approach #3 – Create a new O365 Group, delete the old DL and then update the new O365 Group to use the old DL’s SMTP name, or add it as a secondary proxy alias

        There are tradeoffs with each approach, but in general you want to select the approach that prevents NDR’s from occurring, and you want to make sure to automatically subscribe the members of the old DL to the new O365 Group so that they don’t have to manually take any action in order to start receiving new emails from the group. In a future blog post, I will walk through the end to end process.

        Update 5/20/2015: If you take approach #3,  I now recommend leaving the primary SMTP address as the onmicrosoft.com address, and adding the old DL as a secondary proxy address. The reason for this is because the new Office 2016 Office Client will not display these Groups if the primary address is not an onmicrosoft.com domain name.

        VM level backups now available in Azure Backup

        As far as Azure IaaS goes, this is the biggest improvement to the platform since the ExpressRoute offering.

        The announcement is here, and I highly recommend reading it:
        http://azure.microsoft.com/blog/2015/03/26/azure-backup-announcing-support-for-backup-of-azure-iaas-vms/

        The highlights:

        • With Azure Backup, you can now get application consistent backup of Windows VMs without having to shut down the VM.
        • “In order to backup IaaS VMs, the customer needs to deploy absolutely nothing”*
          Note: This is accurate insofar as you have the Azure VM Agent installed (see Prerequisites below)
        • Azure Backup truly achieves “set-and-forget” for VM backups.
        • Azure Backup does additional processing to determine the incremental changes between the last recovery point and the current VM state. By transferring and storing only the incremental changes, Azure Backup is highly storage efficient.

        Azure VM Agent Prerequisite

        • A very important prerequisite is that the Azure VM Agent must be installed. This is performed when the VM is first created, but if you uncheck the box to install the agent, then you will not be able to back it up with the new VM level backup feature.
          image
        • If you do not have the Azure VM Agent installed, you will get an error message during the registration job step:
          ”Failed to install the Azure Recovery Services extension on the selected item. VM Agent is a pre-requisite for Azure Recovery Services Extension. Please install the Azure VM agent and restart the registration operation.”
        • You can manually download and install the VM Agent if it is not installed on the VM, see this article for more information:
          https://msdn.microsoft.com/en-us/library/dn832621.aspx
        • The VM agent itself can be downloaded directly from (here) and is very small and takes seconds to install.
        • After manually installing the agent, it is necessary to set the ProvisionGuestAgent value to true using Powershell or a REST call. If you do not set this value after manually installing the VM Agent, the addition of the VM Agent is not detected properly.)
        • See my blog post for manually installing the VM agent for step by step instructions:
          http://tctblgs.azurewebsites.net/manually-install-the-azure-vm-agent/

        Seeing it in Action!

        Assuming you have already setup your recovery vault, and your VM’s have the VM Agent installed, then there are three easy steps to start backing up VM’s in Azure IaaS

        image

        After clicking on ‘Discover Virtual Machines’ you then click on the Discover button at the bottom of the screen.

        image

        After discovery completes, you then click on the Register button.

        image

        This brings you to a screen to select the VM’s that you want to protect.

        image

        Clicking on the checkmark will spawn a register job that can be viewed on the Jobs tab. In my case, this job took 4 minutes to run.

        image

        Now that we have a VM registered, the next step to perform is step number 3, “Protect Registered Azure Virtual Machines.

        image

        image

        Select the item you want to protect

        image

        You can then select an existing policy or create a new policy

        image

        When the backup has taken place, you can view it under protected items.

        image

        You can force a new backup or you can click on Restore to bring the VM back to life as a new VM standing next to the old one (it does not overwrite the existing VM).

        image

        Restoring a backup

        A backup is only “good” if you can verify it by performing a restore. Until then, you should not trust your backups. I have learned this the hard way in the trenches =)

        It is interesting that when you restore a VM, it does not overwrite the existing VM, but it instead deploys it alongside the current VM.

        image

        You can check the Jobs tab to see how long the restore will take. In my case, the restore took 23 minutes.

        image

        When the restore job completes, you can view the job notes:

        image

        To view the restored VM, I had to sign out and back into the Azure Management portal, but then I saw the restored VM amongst my other VM’s:

        image

        This raises a practical operational question where you need to be sure to shut off the old one before the new one starts up otherwise in a batch environment you wouldn’t want two VM’s running the same batch (you get the idea, you need to know what your VM’s are doing and coordinate properly).

        Therefore, it would be good to have an option during the restore process for Azure to automatically shut down the original VM on your behalf to tighten-up the handoff, as you want to avoid having two machines with the same computer name and SID running on the network.

        For example, in my restored VM, I can see it still has the original computer name (as I would expect) and so even though the name of the VM in Azure shows as ‘MyRestoredVM’ the actual computer name maintains the original name. (This is okay behavior, but just remember we need to shut off the original VM now too). I posted this feedback on the Azure Feedback portal, please click (here) to vote if you agree and would like the Azure Product team to include this feature in a future release.

        image

        Manually install the Azure VM Agent

         

        When you first deploy a Virtual Machine to Azure using the Gallery, you have the option of installing the VM Agent. You should always leave this box selected because it adds tremendous value.

        image_thumb[8]

        VM extensions can help you:

        • Modify security and identity features, such as resetting account values and using antimalware
        • Start, stop, or configure monitoring and diagnostics
        • Reset or install connectivity features, such as RDP and SSH
        • Diagnose, monitor, and manage your VMs
        • Backup your VMs with the new Azure VM level Backup feature (see my blog post here for more information on that feature announced March 26, 2015).

        The agent allows you to add extensions to the VM, for more information, see this article:
        https://msdn.microsoft.com/en-us/library/dn832621.aspx

        You can manually download and install the VM Agent if it is not installed on the VM, see this article for more information:
        https://msdn.microsoft.com/en-us/library/dn832621.aspx

        The VM agent itself can be downloaded directly from (here) and is very small and takes seconds to install.

        After manually installing the agent, it is necessary to set the ProvisionGuestAgent value to true using Powershell or a REST call. If you do not set this value after manually installing the VM Agent, the addition of the VM Agent is not detected properly.) The following code example shows how to do this using PowerShell where the $svc and $name arguments have already been determined

        $vm = Get-AzureVM –serviceName $svc –Name $name
        $vm.VM.ProvisionGuestAgent = $TRUE
        Update-AzureVM –Name $name –VM $vm.VM –ServiceName $svc

        Before you can run the powershell commands above, you first need to install the Azure Active Directory powershell module and then run the add-azureaccount command. Then to make sure you can see your VM’s, you can run get-azurevm.
        image_thumb[9]

        In this screenshot you can see I have two VM’s, one with the agent installed and one without it.

        image_thumb[12]

        So after manually installing the VM Agent, I can then run these commands to update Azure so that it knows the agent has been installed inside the guest VM:

        $vm = Get-AzureVM –serviceName TCTCloudService –Name MyBackupTest
        $vm.VM.ProvisionGuestAgent = $TRUE
        Update-AzureVM –Name MyBackupTest –VM $vm.VM –ServiceName TCTCloudService

        image_thumb[14]

        Now when I check for guest agent status, I can now see the same for both VM’s:

        image_thumb[16]

        Upgrading Dirsync to Azure Active Directory Connect Public Preview – March 2015 update

        In this blog post I am going to review the upgrade process of Dirsync to the new AAD-Connect. The March 2015 preview now makes it possible to perform an in-place upgrade from Dirsync to AAD-Connect. This entire process took 30 minutes for me in my lab environment, but your performance and time may vary because I am running a small environment on SSD hard disks =).

        Important: You must read the “Azure AD Connect Public Preview 2 Readme” file – there are too many requirements and prerequisites in that Readme file to summarize in this blog post, so please do not skip that reading.

        I also recommend reading the “New Sync features in Azure AD Connect Public Preview 2.docx”

        You can download the AAD-Connect March Preview, Readme file, and the New Sync Features document from the Connect site here:
        https://connect.microsoft.com/site1164/Downloads/DownloadDetails.aspx?DownloadID=53949

        image

        image

        After the prerequisites are installed, AAD-Connect detects Dirsync and will now upgrade it in-place:

        image

        Next, I am prompted to enter my Azure AD Administrator Credentials

        image

        Lastly, I am ready to click Install. I recommend unchecking the box to start synchronizing after install. You can always start it manually later when you are ready.

        image

        This part of the wizard took about 10 minutes to uninstall Dirsync and install AAD-Connect.

        image

        Next, I clicked on the icon on the desktop “Azure AD Connect”

        image

        I then signed in.

        image

        image

        I then type in an Enterprise Admin account

        image

        If I want to connect to an additional forest, I can do that here:

        image

        Next, I select that I want to enable password writeback. You will notice that user, group and device writeback are greyed out and not selectable. This is because we have not yet run the AD preparation steps necessary to enable those features. See the bottom of this blog post for details on enabling those features.

        image

        And one last confirmation by clicking Install

        image

        And one last confirmation that the installation was successful

        image

        Enabling User, Group and Device Writeback

        In the readme file, it describes the powershell commands to run that will enable this enhanced functionality.

        For group writeback, your on-prem Exchange server must be running Exchange 2013 CU8. Also, the default Sync Rules will not add the address book attribute. Find the value from your Exchange server and add this as a custom attribute flow.

        The Initialize-ADSyncDomainJoinedComputerSync Function will initialize your Active Directory forest to sync Windows 10 domain joined computers to Azure AD. This function will need to be run on each forest to allow Windows 10 computers to authenticate against ADRS.

        image

        The Initialize-ADSyncDeviceWriteBack Function will initialize your Active Directory forest for write-back of device objects from Azure AD to your Active Directory. It will also set up the necessary permissions on the AD Connector account. This only needs to be run on one forest even if AzureADConnect is being installed on multiple forests.

        Note: I received errors when running this command.
        image

        The Initialize-ADSyncGroupWriteBack Function will initialize your Active Directory forest for write-back of group objects from Azure AD to your Active Directory. It will grant permissions to an AD Connector account for modifying objects in a pre-existing group WirteBack container. Please use this same container for Group WriteBack when you run the wizard. This function only needs to be run in one forest.

        I created a new organizational unit for these objects called “CloudUsersAndGroups”

        image

        Initialize-ADSyncGroupWriteBack -GroupWriteBackContainerDN “OU=CloudUsersAndGroups,DC=thecloudtechnologist,DC=com”

        image

        The Initialize-ADSyncUserWriteBack Function will initialize your Active Directory forest for write-back of user objects from Azure AD to your Active Directory. The users will be created with a random password so you have to reset the password in ADDS for the user to actually be able to login.

        Initialize-ADSyncUserWriteBack –UserWriteBackContainerDN “OU=CloudUsersAndGroups,DC=thecloudtechnologist,DC=com”

        image

        Note: The Azure AD Premium feature password writeback does not work for users configured for user writeback. In other words, if you have a cloud identity, and that user is synced to the on-premises AD, then the password writeback feature will not update the newly created on-prem AD account version of the cloud identity user. I assume it would still reset the cloud identity portion.

        After running these commands, I went back to the wizard but the options were still greyed out. This may be because my AD Schema is not running Exchange 2013 CU8, so I will update my schema and then update this blog post after that is done.

        image

        Next, read how to configure Azure AD Password Write-back on MSDN (I recommend reading all seven (7) articles under ‘Password Management’
        https://msdn.microsoft.com/en-us/library/azure/dn510386.aspx 

        image

        In the Azure AD Tenant, I enabled the toggle “USERS ENABLED FOR PASSWORD RESET”

        image

        And when I scroll down, I now see that Password write back service status is ‘Configured’

        image

        What does the user experience look like for self service password reset?

        Typically, the user will click on the “Can’t access your account” link below the Office 365 sign-in page at http://portal.office.com

        image

        Otherwise, they can also bookmark directly to the self-service password reset page:
        https://passwordreset.microsoftonline.com

        SNAGHTMLa144c75

        They will be prompted to authenticate with text message, email or phone call. You can configure which of these options you want the user to enter. The user can also register for self service password reset and populate this contact information in advance, or an administrator can pre-populate it (again, please read the MSDN articles above for more details).

        image

        The user can then select the new password which must conform to the on-premises password policy.

        image

        Controlling Access to Application Proxy (Optional)

        This is a follow-on post from my post on Azure Application Proxy. Assuming that you have published your first application via the Azure Application proxy, you may now want to secure it with Multifactor authentication.

        You can enable access rules to limit access to the application you publish with Application Proxy to specific groups, you can require multi-factor authentication, or only require MFA when the user is outside a specific network location (external IP address of NAT firewall).

        image

        The first time MFA is enabled for an application published by Azure Application proxy, the user will be required to enroll in MFA.

        image

        After enrolling, the user will be sent a text message or a phone call to their phone number registered in AD. Then they will logon to the application with two forms of authentication (password + phone call or text message).

        The next time they browse to the application, after authenticating with their username and password, the application will automatically send them a text message and they can then sign in after entering the SMS code sent to their smart phone.

        image

         

        The intranet application hosted internally at https://intranet will then load up fine.

        image

        Azure Application Proxy services

         

        Azure AD Application Proxy (AAD-AP) is a type of reverse proxy solution that enables access to web-based applications that exist on a corporate LAN, secured behind a corporate firewall.

        The benefits of using AAD-AP rather than using a traditional firewall to expose an application to external access are (1) the convenience of listing the application in the user’s Office 365 menu choices (see first screen shot below) or the Azure Access panel and (2) the enhanced security of preauthentication using Azure Active Directory and the option of enhancing security with Azure Multifactor Authentication. These later two security enhancements were previously provided by solutions such as Microsoft ISA or TMG.

        The convenience that users benefit from is having one place to access all internal web-based corporate applications, as well as over 2,400 3rd party SaaS applications. In the screen shot below you will see that amongst the Office 365 applications list, I have also configured single sign on for Facebook, Google Docs, ADP, Salesforce, and more. It is very convenient to logon once to Azure Active Directory or Office 365, then launch other applications without having to logon to those applications individually.  This amounts to huge time savings and it is really nice not having to remember 10 separate usernames and passwords! This now puts Azure AD on par with other hosted identity providers such as Okta, Onelogin or PingFederate.

        This blog post is a review of AAD-AP, a component of Azure AD Premium and Azure AD Basic.

        image
        AAD-AP exposed application ‘My Intranet’ in Office 365

        If you don’t have Office 365 you can also use the Microsoft Azure access panel to achieve SSO (as shown below).

        image
        http://myapps.microsoft.com (this redirects you to https://account.activedirectory.windowsazure.com/profile/ )

        The 3rd way of accessing internal applications through AAD-AP is a direct hyperlink. This is provided after configuring the application in the Azure management portal.
        For example: https://myintranet-tctechnologist.msappproxy.net/ 
        The convention is: (Application Name – Azure Tenant Name – MSAppProxy.net (similar in concept to the O365 tenant name “onmicrosoft.com”)
        Custom domain names are coming soon, so you will be able to have the AAD-AP name in front of your own domain name, ex: https://myintranet.contoso.com 

        image

         

        Application Proxy Prerequisites

        • You must have an Microsoft Azure administrator account. If you don’t’ have one, you can get a 30 day trial here.
        • You must have an Azure AD Premium license. For more information, see Getting Started with Azure AD Premium. You can also get a 30 day trial to evaluate this as well.
        • A server running Windows Server 2012 R2 or Windows 8.1 or higher on which you can install the Application Proxy Connector. The server must be able to send HTTPS requests to the Application Proxy services in the cloud, and it must have an HTTPS connection to the applications that you intend to publish.
        • The server running the connector must be able to make outbound connections to this domain and subdomain: msappproxy.net on the following TCP/IP port ranges:
          443, 20200-20210, 9352, 10100-10120, 8080, 9090 and 9091. For a description of what these ports are used for, see : https://msdn.microsoft.com/en-us/library/dn768214.aspx
            • There are no inbound ports required, because Azure Application Proxy service (ApplicationProxyConnectorService.exe)  initiates a reverse tunnel from the VM out to Azure.
        • If the web application requires windows integrated authentication, then the machine where the connector is installed must be joined to the domain.
        • For windows integrated authentication, The UPNs in Azure Active Directory must be identical to the UPNs in your on-premises Active Directory in order for preauthentication to work. Make sure your Azure Active Directory is synchronized with your on-premises Active Directory.
        • For accessing applications remotely, the application that you are proxying cannot send the user any 302 redirects otherwise those will most likely contain internal server names that are not accessible internally. See the scenario below that happens when I first tried to publish the Lync control panel. The fix for the Lync scenario was to publish the actual path to the CSCP virtual directory. This is thanks to the new Path Publishing feature that was announced on March 11th, 2015 on the Azure Application Proxy blog here.
        • In my testing, AAD-AP worked with Windows machines running Internet Explorer or Chrome, iOS devices and Mac OSX (Safari and Chrome). The official support statement says that the Access Panel Extension is available for Internet Explorer 8 and later, Chrome, and Firefox browsers.

        Microsoft AAD Application Proxy Connector

        The connector is a small 4 MB file that can be downloaded from the Azure Management Portal when configuring a new application that relies on Application Proxy.

        You should install the connector software on a VM that has HTTP/S access to the application that you want to publish, and outbound access to Azure.

        Installing the connector is quick and painless. The only information you are prompted to provide is just the Azure tenant administrator username and password.

        image

        image

        image

        image

        It installs two services, the main service runs under network service because it must be able to interact with other servers to perform the reverse proxy, and optionally to perform Kerberos delegation for web based applications that required windows authentication.

        image

        Configuring the Connector for Windows Integrated Authentication

        Let’s say you want to publish the Lync Control Panel to through the Azure application proxy.

        Since the Lync Control Panel requires Windows Integrated Authentication, we need to configure the Active Directory Computer object for delegation. For step by step details, see this Microsoft article, otherwise I will cover the high level steps here.

        I did not have a service principal name (SPN) for my Lync simple URL for administration, I had to create it first. Before creating an SPN, it is good practice to check to see if it exists first. You can query to see if an SPN exists with the ‘setspn’ command that you run in a regular command shell on any server (domain admin privs are required).
        setspn -Q http/admin.thecloudtechnologist.com
        Note: The SPN format is a little odd because there is a single forward slash, whereas you would normally expect to see a colon followed by two slashes.

        To create the SPN, I ran this command:
        setspn –S http/admin.thecloudtechnologist.com tctfe01  
        (Note: The Lync ‘standard edition’ front-end server name was TCTFE01. For Enterprise editions, you will use a service account rather than an individual computer name). You can use the –Q or –L parameters to verify that it registered correctly.

        After the SPN has been created, the next step is to configure the Active Directory Computer object for delegation. Find the computer object for the machine where you installed the Connector software in Active Directory Users and Computers. In my case, my connector was installed on a server named “HV1” so I found that object and on the delegation tab, I added the computer name of my Lync standard edition front end server “TCTFE01.” For Enterprise Edition deployments, you would configure delegation on the relevant service account instead.

        image

        This allowed me to find the SPN I had created for the SPN record admin.thecloudtechnologist.com

        image

        Now you can add the SPN into the Azure Management portal:

        image

        You should now see the Lync Control panel in the Office 365 list of applications.

        What I found out next helped me to understand more about the features and limitations of Azure Application Proxy.

        When I published the simple URL for the Lync control panel (‘admin.thecloudtechnologist.com’) I found that it was working internally but it failed to work externally. After some fiddler analysis I discovered that it was working internally because Lync web services sent an HTTP 302 Redirect to the internal DNS host name of the Lync standard edition front-end server, along with the virtual directory of the control panel, ex: (‘tctfe01.thecloudtechnologist.com/cscp’). Since the internal host name is not published in external DNS, nor is there a firewall rule permitting this, it failed externally.
        So Azure Application Services is faithfully sending the 302 redirect back to the external user, so there was nothing broken, per se. This shows one requirement to be aware of – check to make sure that the application you want to proxy does not use 302 redirects.

        HTTP/1.1 302 Redirect
        Content-Length: 168
        Content-Type: text/html; charset=UTF-8
        Location: https://tctfe01.thecloudtechnologist.com/Cscp
        Server: Microsoft-IIS/8.0 Microsoft-HTTPAPI/2.0
        X-Powered-By: ASP.NET

        <head><title>Document Moved</title></head>
        <body><h1>Object Moved</h1>This document may be found <a HREF=”https://tctfe01.thecloudtechnologist.com/Cscp”>here</a></body>

        The workaround that I found was to use the new path publishing feature (Thanks Microsoft Application Proxy team!!). This enabled me to publish the full path where the 302 redirect was sending the user to (‘https://tctfe01.thecloudtechnologist.com/Cscp’). This can only be setup when the application is first configured, so if you forgot to add /cscp in the beginning, you will need to delete the app and start over.

        image

        In my case, I didn’t have /cscp/ from the beginning, so I had to delete my app and start over like this:

        image

        There was already an existing SPN record, so I did not have to create another SPN for tctfe01.thecloudtechnologist.com, but I did have to configure computer delegation on the HV1 computer account for http/tctfe01.thecloudtechnologist.com instead of http/admin.thecloudtechnologist.com.

        So even though the internal dns name of my Lync server is not published externally, this shows the power and benefit of Azure Application Proxy because I can now access the Lync administrative control panel from anywhere.

        SNAGHTML4ed4d601

         

        Recommendations

        1. The connector software is not highly available, so make sure to install it on a virtual machine that benefits from high availability at the hypervisor layer (ex: vmotion or live migration).

        2. Since this is such a new service, I am not sure what the scalability and performance of the connector service would be in a production environment. So you would need to perform your own performance testing. Consider using Azure’s Visual Studio Cloud Load Testing

        3. In the next blog post in this series, I describe the new conditional access feature using Azure’s multi-factor authentication. See Controlling Access to Application Proxy (Optional)