# Google Workspace OU Automation using Microsoft Entra ID App Roles & SCIM Provisioning

<table class="MsoNormalTable" id="bkmrk-field-details-docume" title=""><tbody><tr><td>**Field**

</td><td>**Details**

</td></tr><tr><td>Document Type

</td><td>Google Workspace OU Automation using Microsoft Entra ID App Roles &amp; SCIM Provisioning

</td></tr><tr><td>Applies To

</td><td>Entra ID, Google Workspace, SCIM &amp; Entra ID App Roles

</td></tr><tr><td>Audience

</td><td>Systems Administrator / IT Engineer

</td></tr><tr><td>Author

</td><td>AK. Udofeh

</td></tr><tr><td>Last Updated

</td><td>July 2026

</td></tr></tbody></table>

##### **Design Decision Record (DDR)**

<div class="TyagGW_tableContainer" id="bkmrk-item-decision-busine"><div class="group TyagGW_tableWrapper flex flex-col-reverse w-fit" tabindex="-1"><table class="w-fit min-w-(--thread-content-width)" data-end="2486" data-start="1807"><thead data-end="1826" data-start="1807"><tr data-end="1826" data-start="1807"><th class="last:pe-10" data-col-size="sm" data-end="1814" data-start="1807">Item</th><th class="last:pe-10" data-col-size="lg" data-end="1826" data-start="1814">Decision</th></tr></thead><tbody data-end="2486" data-start="1847"><tr data-end="2007" data-start="1847"><td data-col-size="sm" data-end="1874" data-start="1847">**Business Requirement**</td><td data-col-size="lg" data-end="2007" data-start="1874">Automatically assign Google Workspace users to the correct Organizational Unit (OU) based on Microsoft Entra ID group membership.</td></tr><tr data-end="2178" data-start="2008"><td data-col-size="sm" data-end="2023" data-start="2008">**Decision**</td><td data-col-size="lg" data-end="2178" data-start="2023">Use Microsoft Entra ID Enterprise Application App Roles combined with SCIM expression mapping to populate the Google Workspace `OrgUnitPath` attribute.</td></tr><tr data-end="2299" data-start="2179"><td data-col-size="sm" data-end="2192" data-start="2179">**Reason**</td><td data-col-size="lg" data-end="2299" data-start="2192">Eliminates manual OU administration while maintaining Microsoft Entra ID as the single source of truth.</td></tr><tr data-end="2424" data-start="2300"><td data-col-size="sm" data-end="2330" data-start="2300">**Alternatives Considered**</td><td data-col-size="lg" data-end="2424" data-start="2330">Manual OU assignment, Google Directory Sync (Beta), Azure Automation, Extension Attributes</td></tr><tr data-end="2486" data-start="2425"><td data-col-size="sm" data-end="2447" data-start="2425">**Chosen Solution**</td><td data-col-size="lg" data-end="2486" data-start="2447">App Roles + SCIM Expression Mapping</td></tr></tbody></table>

</div></div>[![Google OU member automation via Entra ID.png](https://docs.aktechnoservices.com/uploads/images/gallery/2026-07/scaled-1680-/google-ou-member-automation-via-entra-id.png)](https://docs.aktechnoservices.com/uploads/images/gallery/2026-07/google-ou-member-automation-via-entra-id.png)

##### **Overview**

Google Workspace controls application access through **Organizational Units (OUs)** rather than user groups.

During the pilot implementation, Microsoft Entra ID was already responsible for user provisioning via SCIM. The remaining challenge was to automatically place newly provisioned users into the correct Google Workspace OU without introducing additional synchronization tools or manual administration.

This implementation extends the existing SCIM provisioning configuration by using Enterprise Application App Roles together with an expression mapping to automatically populate the Google Workspace `OrgUnitPath` attribute.

##### **As a result:**

Entra Security Group  
 │  
 ▼  
Enterprise Application App Role  
 │  
 ▼  
SCIM Expression  
 │  
 ▼  
Google OrgUnitPath  
 │  
 ▼  
User automatically moved into the correct OU

<p class="callout info">**Prerequisites**</p>

##### **Microsoft Entra ID**

- Google Cloud / G Suite Connector by Microsoft configured
- SCIM Provisioning operational
- Users assigned to the Enterprise Application
- Enterprise Application Administrator or Global Administrator permissions

##### **Google Workspace**

- SCIM configured
- Target Organizational Units created
- Administrative access

##### Step 1: Create the Google Workspace Organizational Units

Navigate to:

```bash
Google Admin Console
Google Admin Console
Directory
Organizational Units
```

Create the required Organizational Units.

Example:

```
/
├── AI-ONLY Users
├── OU_Automation
├── Students
└── Staff
```

<p class="callout info">The Google Workspace OU names will later be used as the Enterprise Application App Role Display Names.</p>

##### Step 2: Create Enterprise Application App Roles

Navigate to:

```
Entra ID

↓

App registrations

↓

Google Cloud / G Suite Connector by Microsoft

↓

App Roles
```

Create one App Role for each Google Workspace OU.

Recommended example:

```
| Display Name     | Value         |
| ---------------- | ------------- |
| `/AI-ONLY Users` | AI_ONLY_USERS |
| `/OU_Automation` | OU_AUTOMATION |
| `/Students`      | STUDENTS      |
| `/Staff`         | STAFF         |

```

<p class="callout info">The **Display Name** **must exactly match** the Google Workspace Organizational Unit path. The **Value** is simply an identifier and **does not need to match the OU**.</p>

##### Step 3: Assign Users or Groups to the Enterprise Application

Navigate to:

```
Enterprise Applications

↓

Google Cloud / G Suite Connector by Microsoft

↓

Users and Groups
```

Assign:

- Individual users **or**
- Microsoft Entra ID Security Groups

##### **Critical Step**

When creating the assignment, **select the correct App Role**.

Example:

```
| Security Group | App Role         |
| -------------- | ---------------- |
| GG-GWS-AI      | `/AI-ONLY Users` |
| GG-GWS-Pilot   | `/OU_Automation` |

```

<p class="callout info">Simply assigning a user or group to the Enterprise Application is **not sufficient**. The App Role selected during the assignment determines the Google Workspace OU that the user will be provisioned into.</p>

##### Step 4: Configure the SCIM Expression Mapping

Navigate to:

```
Enterprise Applications

↓

Google Cloud / G Suite Connector

↓

Provisioning

↓

Attribute Mapping

↓

Users

↓

Add Attribute Mapping
```

Configure the mapping as follows:

```
| Setting          | Value                                           |
| ---------------- | ----------------------------------------------- |
| Mapping Type     | **Expression**                                  |
| Expression       | `SingleAppRoleAssignment([appRoleAssignments])` |
| Target Attribute | `OrgUnitPath`                                   |
| Apply Mapping    | Always                                          |
| Match Object     | No                                              |

```

This expression evaluates the assigned Enterprise Application App Role and writes the App Role **Display Name** into the Google Workspace `OrgUnitPath` attribute.

##### Step 5: Validate the Configuration

Use **Provision on Demand** to test with a pilot user.

OrgUnitPath

Old:  
/AI-ONLY Users

New:  
/OU\_Automation

```
OrgUnitPath

Old:
/AI-ONLY Users

New:
/OU_Automation
```

Confirm in Google Workspace that the user has automatically moved to the new Organizational Unit.

##### **Monitoring &amp; Validation**

Provisioning logs can be viewed under:

```
Enterprise Applications

↓

Google Cloud / G Suite Connector

↓

Provisioning Logs
```

Successful provisioning should show an update similar to:

```
| Attribute   | Old              | New              |
| ----------- | ---------------- | ---------------- |
| OrgUnitPath | `/AI-ONLY Users` | `/OU_Automation` |

```

##### **Notes on Group Provisioning**

During testing, Entra ID Security Groups were evaluated by the provisioning service but were logged as:

```
SkipReason

MissingJoiningProperty
```

This behaviour is expected for this implementation and **does not impact automated OU placement**.

The design relies on:

- Group membership within Microsoft Entra ID
- Enterprise Application App Role assignments
- SCIM updating the **user** object

Google Workspace group objects are **not** required for this solution.

##### **Important Considerations**

- The App Role **Display Name** must exactly match the Google Workspace OU path.
- The leading `/` should be included (for example `/Students`).
- Users should only be assigned **one** Google Workspace App Role at a time.
- Group-based assignment is recommended over individual user assignments.
- Existing users are not affected until assigned an App Role and reprovisioned.
- Provisioning should first be validated using **Provision on Demand** before enabling for production users.

##### **Best Practices**

- Use Microsoft Entra ID Security Groups as the administrative entry point.
- Maintain Microsoft Entra ID as the single source of truth.
- Keep App Role names aligned with Google Workspace OU paths.
- Test all new OU mappings with a pilot user before assigning to production groups.
- Review provisioning logs after any App Role or OU changes.

##### **Lessons Learnt**

- `SingleAppRoleAssignment([appRoleAssignments])` returns the **App Role Display Name**, making it ideal for mapping directly to `OrgUnitPath`.
- The App Role **Display Name** should include the leading `/` and exactly match the Google Workspace OU path.
- The App Role **Value** is not used for this mapping and can remain a simple identifier.
- Google group objects may appear as `MissingJoiningProperty` in provisioning logs without affecting the user OU automation.

##### **Summary**

This implementation extends the existing Google Workspace SCIM provisioning configuration by using Enterprise Application App Roles to dynamically populate the Google Workspace `OrgUnitPath` attribute.

The solution enables Microsoft Entra ID group membership to automatically determine a user's Google Workspace Organizational Unit, providing a scalable, low-maintenance, and script-free approach to managing Google Workspace service access.