AzureAD: Setup SSO to G-Suite for free, and govern access! (Google Apps)

Did you know Azure Active Directory can provide Single Sign-On (SSO) to G-Suite (Google Apps)? In this blog, we will explore how to set this up from both the Azure AD side and also the G-Suite side.

Once SSO is configured, consider creating policies for Conditional Access to govern how G-Suite is accessed (e.g. only from a managed device, specific network, monitor for threats of the credentials such as for sale on the dark web, etc). For more information on G-Suite and Azure AD integration for SSO, see Tutorial: Azure Active Directory integration with G Suite

Note: SSO for up to 10 apps comes with the free version of AzureAD. For additional capability, P1 or P2 may be required. See Azure Active Directory pricing for more information.

Important: Chromebooks can sign-in with Azure AD credentials, see this video! (and here for more information)

Also Important: Once SSO is enabled in G-Suite only Azure AD credentials will be authorized and all legacy credentials (i.e. G-Suite credentials) will not be authorized for sign-in. If the user is using a Windows 10 device that is AADJ, then they will not need to type in their password to access G-Suite, SSO from Win 10 will automatically be available.

Let’s begin!

Add G-Suite to Azure AD and configure it:

From within the Azure portal navigate to Azure Active Directory -> Enterprise Applications -> New Application and search for G Suite then click Add:


Once added, click Single Sign-on and click SAML

Edit the Basic SAML Configuration by clicking the pencil icon:

Configure using the following parameters:



Click Save. For User Attributes & Claims click the pencil icon:

 

Add a new claim:

Go back to the main SAML SSO configuration page, and download the base64 certificate for SAML Signing Certificate:

Copy the following URLs to a scratch pad, we’ll use these to configure G-Suite:

 

Setup G-Suite for SSO:

See this article for more information on configuring G-Suite for SSO. From within G-Suite navigate to Admin –> Security -> Setup SSO. Paste the URLs you copied in the last step, into the SSO configuration, upload the certificate you downloaded previously, check the box for use a domain specific issuer and then click Save:

 


Assign the user to G Suite

Back in the Azure portal, click Users & Groups from within the G-Suite Enterprise Application:


Add a new user to G-Suite:


Turn on Provisioning:

Click on Provisioning and go through the steps on the blade. Starting with changing Provisioning Mode to Automatic.


Then click Authorize and type in your G-Suite credentials to go through the authorization process. Grant consent:

Back in the Azure portal, click Save to save your provisioning configuration. Once saved, you can opt to enable automatic synchronization of identities from Azure AD to G-Suite by clicking On for Provisioning Status:

 

Side bar, I could configure self service for end-users!


 

Back in G-Suite, you will notice the assigned users will start to sync:

 

Time to test!

I’m going to navigate to http://mail.google.com/a/soseman.org:


Notice this will redirect to Azure Active Directory:


Notice it challenges me for multi-factor authentication!


And I respond to the challenge using my Apple Watch 🙂


Once authenticated, accept the terms and conditions:


Now, I’m logged in and ready to use G-Suite!


Browsing to myapps.microsoft.com – G-Suite is added to the launcher!

 


 

Conclusion:

As you can see, configuring Single Sign On for G-Suite using Azure Active Directory is a rather easy and simple process – and probably can be completed within 15 minutes or less. Once configured, don’t forget using Azure AD Conditional Access to govern how G-Suite is accessed, such as requiring a managed device (mobile or PC), monitoring the credentials for being compromised (impossible travel, up for sale on dark web, coming from atypical locations,etc), requiring MFA, and more!

Block OneDrive Downloads and Audit OneDrive Activity! (SharePoint too!)

Do you have a business requirement to block the download of specific files or file types from OneDrive? What about detailed auditing to understand what files are downloaded or viewed? Well, today is your lucky day – because this is all possible with Microsoft security technology and takes minutes to create. I’m going to walk you through how to do this, and in return, make you look like an IT Rockstar to your organization!

Note: There are other methods to restrict those files from being synchronized using the OneDrive desktop client, we won’t cover those today however (but are accessible in the SharePoint Online Admin Portal)

IMPORTANT: Nothing is 100% secure and it’s all about defense in depth. If you want that extra ply in the tinfoil hat, I highly recommend protecting and encrypting those files with Azure Information Protection as that extra layer of protection.

Also, it’s important to note,the method below at the time of this writing is in public preview.

Background:

My organization, an engineering firm, designs buildings for their commercial and government clients. These design plans often contain additional documentation that are in the form of a .PDF and sometimes photos in the form of a .JPEG (or .jpg).

Scenario:

These .PDF and .JPEG files are highly confidential and thus we want to make sure they never leave OneDrive in Office 365 and can only be viewed in a web browser. In other words, we need to block the ability for an end-user to download these two file types from OneDrive. So, how do we do this?

Solution:

Azure Active Directory Conditional Access and Microsoft Cloud App Security Conditional Access App Control to the rescue! These two products are part of Microsoft 365 E5 or EMS E5 or my new favorite: Microsoft 365 E3 + Identity & Threat Protection. The two products that make up this solution are Azure Active Directory and Microsoft Cloud App Security.

Let’s take a look at how to do this!

Step 1: Create a Azure AD Conditional Access Policy

From within the Azure portal -> Azure Active Directory -> Conditional Access -> New Policy I am going to create a new policy. First, give it a name, “OneDrive Block JPEG and PDF”. Next, assign it to specific users or groups of users. For testing purposes I’m assigning to Adele Vance (IMPORANT: Don’t lock yourself out! Careful planning is required when assigning to all users).

 

 

Next, add Office 365 SharePoint Online as the application to be applied to:

 

 

Under Session, select Use Conditional Access App Control, then click Done.

Next, click Enable policy to enable the policy and click Create.

 

Step 2: Launch OneDrive (via portal.office.com)

Wait 15 minutes for the new Conditional Access policy to propagate. Next, open a new browsing session (inprivate or on another computer) and logon as the test user that was just assigned to. In my case, I am going to sign in to portal.office.com in an in-private session as Adele. Browse to OneDrive in the Office portal and open a file in the web browser. Sign out of this web browsing session when done.

Step 3: Configure Microsoft Cloud App Security

We now need to configure Microsoft Cloud App Security (CAS) and create the appropriate policies.

To start, validate that OneDrive is a connected application by browsing to http://portal.cloudappsecurity.com and navigating to Investigate -> Connected Apps. Notice OneDrive for Business will be listed and connected: (Yes, you can also connect CAS to G-Suite, Box, and other apps!)

 

Next, click on Conditional Access App Control apps and OneDrive for Business will also be displayed:

Step 4: Create the Session Policy in Microsoft Cloud App Security

Next, we need to create the policy that will provide the session control when Adele uses OneDrive in the Office 365 Portal. To do this navigate to Control -> Policies, click New Policy and select Session Policy.

 


 

Let’s give the policy a name and description:

 

Next, under Session control type select Control file download (with DLP). Under Activity source and activity filters configure configure them per the screenshot below

 

 

Scroll down (leave content inspection blank and don’t check the box) and under Actions select Block. OPTIONAL: Configure user email notification or customize block message. When finished at the bottom of the page click Create.

Step 5: Test the User Experience

Now it’s time to test and validate this is the behavior we want. Open a new web browsing session and login as the test user. In my case, I’m going to login to portal.office365.com using Adele Vance’s account in an in-private browser session.


 

Once signed in, navigate to OneDrive in the Office 365 Portal. When you click on OneDrive, notice the splash page indicating this site is being monitored!

 

 

 

 

Also, notice the address of the site. It’s being proxied through CAS.MS indicating this session is being controlled by Cloud App Security:

 

Click Continue to Microsoft OneDrive for Business

Notice I have two files, a .PDF and a .JPEG in the OneDrive folder:

 

Hover the cursor over the PDF and click the ellipses, and select Download

 

Notice, the file download is blocked with a splash message indicating it’s blocked!

 

Now, I know what you’re wondering, “Matt what’s that file it wants to save?” When I open that file, it’s just a warning:

 

From here, within the Cloud App Security Portal, I can audit the activity and receive additional details around this attempt:

Additional alerting can be generated, with an email or SMS notification sent. Imagine having CAS send an email to your ticket system so you can be notified of this violation? What about sending to your SIEM? Endless possibilities.

Conclusion:

As you can see, with a bit of an open mind and creativity, possibilities to build true security solutions that lead to a real business outcome, is entirely possible. The total time spent creating this solution was 10 minutes. Don’t forget to test (which obviously will add to the 10 minutes) all the scenarios for this. Questions? Let me know in the comments below!

Enjoy and help us make this world more secure! –Matt Soseman

Azure Active Directory Resources

One of the new trends in modern IT is consolidating your footprint of on-premises services you provide to the organization. For many organizations, moving those workloads to the cloud or leveraging existing cloud based services for a workload you used to do on-premises can save costs, and cut complexity out of your IT operational portfolio. The primary workload for many that is identity services such as Active Directory and to extend (or migrate) to either Azure Active Directory, Azure Active Directory Domain Services, or simply migrate your Active Directory Domain Controllers to Azure Infrastructure-as-a-Service (IaaS).

This blog will provide you a list of Microsoft resources that you may find useful in your journey of extending or moving Active Directory to the cloud. If you have comments/feedback or come across a resource that I don’t have listed below – please let me know in the comments section. Enjoy!

Starting out with Azure Active Directory:

Deploy a Azure Active Directory Proof of Concept:

Azure AD Connect (tool) and Hybrid:

Azure AD Self Service Password Reset:

What about Azure Active Directory Domain Services? (ADDS running in Azure as a service):

Deployment of Active Directory Domain Services (on-premises) in Azure IaaS (on virtual machines):

 
 

Azure Active Directory Join (instead of domain joined device):

Useful Videos:

Azure Active Directory B2B:

Azure Active Directory Application Management:

Manage Access to Azure:

Securing your identities:

And my favorite…

Azure Active Directory Terms of Use feature (Preview)

Intune: If you want email on your phone, you have to follow the rules!

Maintaining governance over where company data is stored and how it is used, is a core priority for many IT professionals. In this mobile first world, with each user on average having 3+ devices and each with company data on them, ensuring that data is well protected can be a challenge. Giving users a choice of what device they want to use and how they want to use it to execute their job can be empowering – but we must protect the data that lives on those devices. This means ensuring that only compliant/approved devices, (and compliant/approved apps), can access that data. If that data were to be compromised (leaked, lost,stolen,etc) that could be devastating to an organization and place individual employees at risk.

A classic example is when an employee has a smartphone and would like to receive their company email on it. If they go to configure the built-in mail app with their email, how can you require the device to be enrolled into an MDM to be protected and require they use an approved email app? Well, Microsoft Intune and Azure Active Directory Conditional Access to the rescue! In this blog, you and I will take a journey on how to setup and configure this exact scenario and then test it to see what the end-user experience will look like.

Note:
I’m not going to cover Microsoft Intune or Azure AD Conditional Access in full technical detail. Please refer to the product documentation (links above) for more information.

Let’s start with understanding Conditional Access. At a high level, this allows me (IT) to provide you (the end user) with access to corporate resources based on a set of conditions and if you meet those conditions I’ll let you in. If you don’t meet those conditions, or perhaps meet only one or two, I will have additional steps for you to take before I unlock the front door and invite you in for dinner. You can best think of Conditional Access as an “If/Then” statement. For example, if you are coming from a device that is un-managed (and using an un-approved application), then allow access but require you to enroll the device in MDM (i.e. managed) and download the approved application for accessing email. Here’s a good graphical representation on how to think about this, at a high level (as you can see, this can be very powerful!):

 

Now that we have an understanding of Conditional Access, let’s configure it for this scenario. I’m going to create a new Conditional Access policy in Azure Active Directory from within the Azure portal:


Next I will scope it to all users:

 

Next, for Cloud Apps I will chose Office 365 Exchange Online:

Next, for Conditions I will choose device platforms and select all platforms:

For Grant I will choose grant access and check the box for require device to be marked as compliant and require approved client app. I’ll also check the radio button so that all controls are required. (For more information about what are approved client apps see this article).

 

Next I’ll enable the policy and click create:

I now need to configure the device compliance for Intune. I’m going to navigate to Device Compliance in the Intune blade:

I’m going to create a new policy that is targeted at just iOS:

IMPORTANT: If there’s other platforms you need to accommodate, you’ll need to create a new policy for each platform type (i.e. Windows, Mac, Android, etc).

 

For fun, block jail broken devices under device health:

And for more fun, require a passcode under system security:

Now the compliance policy has been created, I am going to assign it to all users:

Okay, let’s take a look at what the user experience is like for this scenario.

 

Let’s launch the native mail app on an iPad (iOS device):

 

Tap Exchange:

 

Sign in with my corporate credentials:

 

Tap sign in:

 

 

When my company’s login page appears to finish the sign in process, enter my password:

What do we have here? …. Looks like Conditional Access kicked in! My device is not managed! But it does give me an option to Enroll!

 

IMPORTANT: To see the enrollment process, reference my other blog article Intune: MDM Enrollment Experience (complete device management)

Once the device is enrolled, with my policy it is also pulling down the Outlook app (well, the user is prompted to install it). When I launch the Outlook app….

 

Tap get started, and there’s my email profile!

NOTE: This does not require any configuration for the email profile to be automatically displayed.

And there’s my email!

Now what if I go back to the native mail app and try to use it? Well following the same process above where I type in my credentials and try to sign in again to the native mail app – Conditional Access will catch me red handed, and block me from using it:

Conclusion: As you can see, this is a very powerful feature and introduces automation into your device security strategy. Enjoy!