Skip to content

geekzter/azure-activedirectory-gsuite-federation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Azure Active Directory federation with G Suite

Azure Active Directory is the Identity Provider for Microsoft online services such as Azure, Azure DevOps and Office 365. If you use another identity provider, you have to federate with Azure Active Directory using the B2B Collaboration feature in order to be able to use the identities you already have in G suite. The create_federation.ps1 script creates a direct federation from Azure Active Directory to a G Suite domain. The goal is to access Azure resources with users originating from the federated G Suite domain.

Pre-Requisites

Creating Federation

  1. Create custom SAML App in G Suite tenant:
  • Use ACS URL https://login.microsoftonline.com/<aad tenant id>/saml2
  • Use Entity ID urn:federation:MicrosoftOnline
  1. Export IDP metadata file e.g. GoogleIDPMetadata-mybrand.io.xml and place it in the same location as create_federation.ps1
  2. Add claim http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress with value Basic Information -> Primary Email address
  3. Enable the newly created G Suite SAML app (default state is OFF)
  4. Create federation by running create_federation.ps1 with G Suite domain name as argument
  5. Invite B2B Guest users from the federated domain

Notes

  • There is a G Suite Office 365 SAML App (it is named after Office 365 as Google assumes that is what you will be accessing, however AAD works with any Microsoft online service), which can be used instead of the custom SAML app. I did not use this app, as it attempts to auto-provision users in the AAD tenant and I prefer this to be a AAD managed process instead.
  • Azure Active Directory Google federation is also in preview, but does not allow custom G Suite domains to be used (yet). Hence direct (SAML, WS-Fed) federation is used instead.

Usage

Access the Azure Portal using a fully qualified url including AAD domain name in it e.g. https://portal.azure.com/mybrand.onmicrosoft.com.

Limitations & Known Issues

  • The Azure EA Portal does not understand B2B accounts, so you can't sign in with Google identities there. However, you should be able to create Azure subscriptions with B2B accounts from the Azure Portal using this method. Note is is recommended to use (break glass) functional user accounts as Azure account owners (see best practices).
  • Setting up federation requires Windows PowerShell modules, hence Windows as OS (no PowerShell Core support unfortunately)
  • This uses Azure Active Directory B2B Direct federation, which is in preview (i.e. limited SLA)
  • I couldn't find a first party CLI for G Suite, so that (SAML app creation) part of the set up is manual

Resources

Disclaimer

This project is provided as-is, and may not necessarily be maintained

Releases

No releases published

Packages

No packages published