0:00
/
0:00
Transcript

Streamlining Microsoft 365 Administration with Unified CLI

Over 2 million companies around the world use Microsoft 365, highlighting its significance for modern businesses. However, managing Microsoft 365 Administration can be challenging.

Understanding these challenges is essential for enhancing your Microsoft 365 Administration processes and improving overall efficiency.

Key Takeaways

  • The Unified CLI makes Microsoft 365 management easier. It combines tools into one place. This saves time and cuts down on confusion.

  • The Unified CLI works well on Windows, MacOS, and Linux. This means different IT teams can use it easily.

  • Using OAuth 2.0 for login makes things safer. It makes sure only allowed users can see important data.

  • Automating tasks like managing many users and SharePoint work with the CLI helps people get more done. It also reduces mistakes.

  • Checking permissions often and using role-based access control makes security better. It also helps control who can access what.

Unified CLI Benefits

The Unified CLI has many benefits for Microsoft 365 administration. It combines tools and makes workflows easier. This helps you work better and faster as an administrator.

Efficiency Gains

With the Unified CLI, you can save time on boring tasks. You don’t have to switch between different tools anymore. You can run commands from one place. This change helps you focus on important tasks.

For example, you can manage user accounts, give out licenses, and set up options with just a few commands. This makes it quicker to do many tasks at once. You can also set up automatic tasks, which gives you more time for important projects.

Getting rid of separate tools, like the Microsoft Graph CLI, shows why a unified method is needed. As Microsoft focuses on the Microsoft Graph PowerShell SDK, you will see better API support and easier connections with automation tools. This change means you will have long-term help and community support, making your admin work easier.

Cross-Platform Support

The Unified CLI works on many operating systems, like:

  • Windows

  • MacOS

  • Linux

This means you can use the CLI on your favorite system without losing features. Whether you like CMD, PowerShell, bash, or zsh, the Unified CLI works well in all these places.

This flexibility is important for teams with different IT setups. You can make your admin processes the same, no matter what systems your team uses. This helps everyone work together better.

Also, the Unified CLI connects easily with current Microsoft 365 workflows and other tools. For example, it can link with Salesforce through Power Automate, helping you sync contacts and tasks easily. It can also work with Trello or Asana using Microsoft Teams or SharePoint, keeping communication and project tracking in one place. This connection helps you get the most out of your technology and boosts overall productivity.

Installation of Office 365 CLI

System Requirements

Before you install the Office 365 CLI, check that your system meets these needs:

  • Operating Systems: The CLI works on Windows, macOS, and Linux.

  • Node.js: You must have Node.js installed. It is best to use the Long-Term Support (LTS) version. You can find how to install it on the Node.js website.

Installation Steps

Follow these steps to set up the Office 365 CLI on your system:

  1. Prerequisites: Make sure you have Node.js installed. If you haven’t done this, go to the Node.js website for help.

  2. Install the CLI: Open your command line interface and run one of these commands:

    • For npm users:

npm install -g @pnp/cli-microsoft365
    • For Yarn users:

yarn global add @pnp/cli-microsoft365
  1. Check the installed version: After you install it, check by running:

m365 version
  1. This command shows the version of the Office 365 CLI you have.

  2. Update the CLI: To keep your CLI current, run:

npm install -g @pnp/cli-microsoft365@latest

By following these steps, you can easily set up the Office 365 CLI. This tool will improve your Microsoft 365 administration experience, helping you manage tasks better.

Authentication and Security

When you use the Unified CLI for Microsoft 365, security is very important. The authentication process makes sure that only allowed users can see sensitive data and do admin tasks.

OAuth Authentication

The Unified CLI mainly uses OAuth 2.0 for safe access. This method lets you log in with Microsoft Entra ID using a web browser. By using OAuth, you avoid problems from older login methods. Microsoft is getting rid of old methods like AUTH PLAIN and AUTH LOGIN because they are not safe. Instead, OAuth 2.0 improves security by using access tokens instead of plain passwords. This change greatly lowers the chance of unauthorized access.

Here’s a quick look at the authentication methods supported by the Office 365 CLI:

Scoped Permissions

Scoped permissions let you control what users can do with the CLI. By giving specific permissions, you limit access to only what each user needs. This idea of least privilege makes security better by lowering the chance of mistakes or bad changes to your Microsoft 365 setup.

To use scoped permissions well, think about these best practices:

  • Review Permissions Regularly: Check and update user permissions often to make sure they match current roles.

  • Use Role-Based Access Control (RBAC): Use RBAC to give permissions based on user roles, making it easier to manage access.

  • Monitor Activity Logs: Watch activity logs to find any unauthorized access attempts or strange behavior.

By following these tips, you can make the security of your Microsoft 365 administration stronger and keep your organization safe.

Practical CLI Usage

The Office 365 CLI has strong tools for managing Microsoft 365. You can make tasks like adding many users and automating SharePoint easier with just a few commands. This section shows how to use the CLI for these important jobs.

Bulk User Management

Managing users in Microsoft 365 takes a lot of time, especially in big companies. The Office 365 CLI makes this easier. You can run commands to handle many users at once.

Here are some common commands for bulk user management:

  • Add Users: You can add many users at the same time using a CSV file. The command looks like this:

m365 aad user add --users <path-to-csv>
  • Assign Licenses: You can give licenses to users in bulk with:

m365 aad user license assign --user <userPrincipalName> --skuId <skuId>
  • Remove Users: To take away users, you can run:

m365 aad user remove --user <userPrincipalName>

These commands help you manage user accounts quickly. You can also automate boring tasks, saving time and cutting down mistakes.

SharePoint Automation

SharePoint automation is another area where the Office 365 CLI works well. You can manage SharePoint sites and resources easily. Here are some automation examples you can use:

With these commands, you can automate tasks like making site collections or changing page properties. This automation cuts down on manual work and boosts productivity.

Also, the Office 365 CLI has many commands for getting, creating, and updating resources. You can easily manage SharePoint Online with simple commands.

Here are some common uses for the Office 365 CLI in Microsoft 365 management:

By using the Office 365 CLI, you can make your Microsoft 365 management better. The CLI’s speed and performance make it a top choice for many admins.

To start with the Office 365 CLI, check out these training resources:

  1. Download and install NodeJS LTS version: NodeJS

  2. Install the CLI for Microsoft 365: Follow the steps at Installing the CLI

  3. Connect to your SharePoint tenant: Instructions are at Logging in to Office 365

  4. Verify your setup: Use the command sitedesign list to check your connection.

With these resources, you can quickly learn how to use the Office 365 CLI well.


In short, the Unified CLI changes how you manage Microsoft 365. It makes workflows easier and helps teamwork. You can control resources with special cross-tenant access settings. This lets you manage permissions better.

As Microsoft moves from the Graph CLI tool to the Graph PowerShell SDK, you will see more API options and better automation. This change shows that Microsoft wants to improve your experience as an admin.

Here are some important points from groups using Unified CLI:

  1. Admins keep control over resources with special cross-tenant access settings.

  2. Automatic settings are created when joining multi-tenant groups.

  3. Policy templates lower the admin workload by setting up needed settings ahead of time.

Use the Unified CLI to make your Microsoft 365 management easier and get ready for new tools in the future.

FAQ

What is Unified CLI?

Unified CLI is a tool you can use on different systems to manage Microsoft 365. It makes administration easier by using the same commands on Windows, macOS, and Linux. This helps you organize your work and automate tasks.

How do I install Unified CLI?

To install Unified CLI, first make sure you have Node.js on your computer. Then, type the command npm install -g @pnp/cli-microsoft365 in your command line. This will install the CLI on your system for everyone to use.

What authentication methods does Unified CLI support?

Unified CLI has different ways to log in, like OAuth 2.0, device code flow, secret, and certificate-based methods. These options help keep your data safe and make sure only allowed users can access Microsoft 365 resources.

Can I automate tasks with Unified CLI?

Yes, you can use Unified CLI to automate many tasks. It lets you run scripts for managing many users, automating SharePoint, and connecting with CI/CD pipelines. This makes your administration work faster and easier.

Is Unified CLI suitable for all operating systems?

Yes! Unified CLI works well on Windows, macOS, and Linux. This means you can manage Microsoft 365 from your favorite system without losing any features.

Discussion about this video

User's avatar