Introduction

In this blog, you will know How to Update Organizational Units (OU) Based on Departments. When managing a large team, it is a common practice to shift team members from one department to another if needed. IT Admins use Google Admin to update the departments and organizational units of Google Workspace users. Foresight has introduced a new feature to update users' OU based on their department information. Thus, it includes a new trigger named User department changed.

Why Do You Need to Update the Organizational Units Based on Departments?

The Organizational Units and department are two different concepts. Both of them help to categorize the users within a smaller unit. The department is a directory field of organization. In contrast, the Admin uses the OU field to enforce different administrative policies. Admin has to work with these two fields simultaneously to manage their policies. However, when a user moves from one department to another, it creates data inconsistency. Thus, the Admin needs to update their OU based on the updated department information.

Source

Update Organizational Units Based on Departments with Foresight

Foresight helps you to automate and streamline your regular business workflows and Google Workspace workflows systematically. As a Google Cloud partner, it also provides automated solutions for Google Workspace operations. Its cost-effective, time-saving, and productive functionalities empower the Good Admin and users to perform their tasks effortlessly.

Admin can update OU based upon the organizational unit through the Google Admin console by creating users’ CSV files. However, there is no specific feature in the Admin Console regarding this. So, Foresight has created this feature for the Admin and automates this process to save more time and manage administrative policies efficiently for the Admin.

Video Demo

Instruction

  • Rule 1: Bulk update users’ OU based on their department information. This rule exports users with a CSV file having two columns: the primary email and the department.
  • Rule 2:  Automate the process of updating users' organizational units when their department information changes.

Rule Creation

  1. Sign in to Foresight and click the New Rule (+) button.
  2. Select the Manual trigger.Rule Creation
  3. Select the List users action.Listusers
  4. Select the Email and the Department columns. Leave the rest of the fields as default. Click Review.Listusers
  5. Give the Rule Name [Rule1 (A): Bulk OU updates on user department information]. Click Create. It was the first part of Rule 1.Rule Name
  6. Now, trigger this rule to download the CSV file.CSV file
  7. You can check the notification through the bell icon about the successful rule creation. Also, you will see the result from the Logs page. CSV file
  8. Click here to Download the CSV file.CSV file
  9. Next, create the second part of Rule 1. So, click the + button and start working on the rule.
  10. Select the Data uploaded trigger and upload the same CSV file. Click Next.CSV file
  11. Select the If action. 
  12. Select Department as variable type and Text contains as operator. Then, give a name for your OU. Here, give the name Digital Marketing.
  13. Click Add Next Action. So, select the Move user to organizational unit action.CSV file
CSV file

14. Enter the Email in the User's primary email and /Social Media into the New organizational unit field.New organizational unit 15. Now, you need to add a Fallback branch in your If action. So, Add Next Action. Again, select the Move user to organizational unit action. Repeat the same step – enter Email in the User primary email and /Social Media into the New organizational unit field. Click Review.New organizational unit

16. Give a Rule Name [Rule 1(B): Bulk OU update based on user department information]. Click Create. Now, the rule has been created.Rule Name17. Upload the same CSV file. Wait for the CSV to become uploaded.Rule Name

18. Verify rule execution in the Logs page.

Rule Name

19. Now, go to the second rule. After clicking the + button, select the User department changed trigger. Leave the user primary field as default. Click NextRule Name

20. Select the Get user info action.

21. Enter the User Primary email in the Primary email field.User Primary email

22. Click Add Next Action. Select the If action.

23. Again, select Department as the variable type and Text contains as the operator. Give a name for your organizational unit – Social Media.Add Next Action24. Click Add Next Action. Select the Move organizational unit action.

25. Enter /Social Media in the Organizational unit path and /Digital Marketing in the Move to field.Social Media 

26. Then, add the Fallback branch. So, click Add Next Action. Select the Move organizational unit action.

27. Again enter /Social Media in the Organizational unit path and /Digital Marketing in the Move to field. Click Review.

28. Give a Rule Name (Rule 2: Updated automatically on user department changes). Click "Create" to make the rule.

Social Media 

Rule Triggering

Before triggering the rule, you have to change the user information from the Admin Console. So, give a name for the Department and Save it. Then, trigger the rule. Rule Triggering

Verifying the Result

You will get a notification about successful rule execution. The Action history will show the status as – Moved organizational unit /Digital marketing to /Social Media. This rule updates user information when the department changes automatically.

Verifying the Result

Verifying the Result

Conclusion

This is all about updating organizational units based on the department information of Google Workspace users. To save time for the Administrator, Foresight reduces the complexity of performing several administrative tasks. It automates the whole process, thereby increasing admin efficiency. Check out Foresight's other automation tools and learn more about it. Try a 14-day free trial of it. Read other topics related to this one – How To Bulk Reset Users Password In Google Workspace, etc.