No history yet

Advanced User Operations

Bulk Operations for Efficiency

Managing users one by one is fine for a small team, but it doesn't scale. As an organisation grows, you need tools to handle changes for dozens or hundreds of users at once. The Microsoft 365 Admin Centre provides two primary methods for this: CSV uploads and PowerShell scripting.

The simplest method is importing a CSV (Comma-Separated Values) file. You can prepare a spreadsheet with user details, save it as a CSV, and upload it directly into the Admin Centre to add or update users in bulk. This is great for straightforward, one-off tasks like updating everyone's office location after a move.

UserNameFirstNameLastNameDisplayNameJobTitleDepartment
adele.v@example.comAdeleVanceAdele VanceMarketing LeadMarketing
lydia.h@example.comLydiaHoganLydia HoganSales AssociateSales

For more complex or repeatable tasks, is the tool of choice. It's a command-line shell and scripting language that gives you granular control over every aspect of your Microsoft 365 environment. With PowerShell, you can write scripts to automate complex workflows, like assigning licenses based on department, setting specific mailbox rules, or generating detailed reports that aren't available in the web interface.

Using automation in Active Directory management not only enhances security and compliance – a key part of Active Directory best practices – but also frees up time to concentrate on growth and innovation.

Delegating with Precision

Granting someone full Global Administrator rights is risky. It's like giving them the master key to every room in the building when they only need to manage the mailroom. A more secure approach is to delegate permissions precisely where they're needed. This is where Administrative Units come in.

Lesson image

An Administrative Unit (AU) is a container you can create within your Microsoft 365 tenant to group users, groups, or devices. You can then assign an administrative role, like User Administrator, specifically to that AU. This limits the scope of that administrator's power to only the members of that unit.

For example, you could create an AU for your 'European Sales' team. Then, you could assign a local IT manager the 'Password Administrator' role for just that AU. They would be able to reset passwords for the European sales staff, but they couldn't touch the accounts of executives or engineers in other departments.

The User Account Lifecycle

When an employee leaves, simply deleting their account is often the wrong move. It can lead to data loss and violate legal or company retention policies. A proper offboarding process is crucial.

First, you should block the user's sign-in access immediately. Next, decide what to do with their data. A common practice is to convert the user's mailbox into a shared mailbox. This preserves all the email data, makes it accessible to a manager or replacement, and frees up the Microsoft 365 license for a new employee. A shared mailbox up to 50 GB doesn't require a license.

If you do delete a user, the account isn't gone forever right away. It enters a 'soft-deleted' state for 30 days. During this period, you can restore the user account with all its properties intact. After 30 days, the account and its associated data are permanently purged.

In rare cases, usually involving complex hybrid environments, you might encounter . This happens when you try to restore a user or create a new one, and its unique identifier clashes with an existing object. Resolving this typically involves using PowerShell to permanently remove the soft-deleted object before re-syncing.

Custom Attributes for Automation

Standard user properties like 'Department' and 'JobTitle' are useful, but sometimes you need more specific metadata. Microsoft 365 provides several custom attributes, often named extensionAttribute1 through extensionAttribute15, which you can use for your own purposes.

You could use a custom attribute to store an employee ID number, a temporary project code, or a flag indicating what type of hardware they have. The real power comes when you use these attributes for automation.

For example, you can create or security groups based on these attributes. Imagine setting extensionAttribute1 to 'VIP' for all senior executives. You could then create a dynamic group where membership is automatically granted to any user with 'VIP' in that attribute. Any security policies or email lists applied to that group will automatically include new executives and exclude those who change roles, all without manual intervention.

Updating these attributes is easiest with PowerShell. A simple command can target a user and set the desired value.

# Sets the 'ProjectAlpha' value for the first extension attribute for a specific user
Set-AzureADUser -ObjectId "lydia.h@example.com" -ExtensionProperty @{"extensionAttribute1"="ProjectAlpha"}

Mastering these advanced techniques shifts your role from a reactive administrator to a proactive manager of identities and data, ensuring your organisation remains secure and efficient as it grows.

Quiz Questions 1/5

An IT manager for the 'European Sales' team needs the ability to reset passwords for their team members only. What is the most secure and efficient way to grant this permission in Microsoft 365?

Quiz Questions 2/5

When an employee leaves, converting their mailbox to a shared mailbox is a common practice because it preserves data and can free up a license.