Workflows

Automate Routine Microsoft 365 Administration

Build reusable workflows from steps or a sample, and run them manually or on a schedule.

What you get

A canvas or a list

Join steps on a canvas, from the start at the top to End, or edit the same steps as an indented list.

Values from step to step

Parameters ask for values when the workflow starts, and variables carry what a step found to the steps after it.

Sample workflows

Start from a sample such as Offboard a Leaver or Lock Down Stale User Accounts, then adapt a copy.

Run on a schedule

Run a workflow in Altivane, or from Windows Task Scheduler without a window.

How it works

Build, run, then schedule

  1. Build or pick a sample

    Add steps and fill in their settings.

  2. Run it

    Every change goes in the change log.

  3. Schedule it

    Windows Task Scheduler runs it without a window.

Steps on a canvas, or as a list

Each step does 1 thing, such as getting data, making a bulk change or exporting a file. Connections show the order the steps run in, not their position on the canvas.

  • On the canvas, each step is a box joined to the next by a line, numbered in running order. An If step has a Yes line and a No line, a loop's steps sit in a box under it, and every path ends at End.
  • The List shows the same steps as an indented list, with a line down from each If and loop to its last step.
  • Snap aligns a step with the grid and the steps around it, and Spacing keeps steps from landing too close. Tidy up aligns the whole workflow on a grid, keeping your arrangement.
  • Properties shows the settings of the step you select. A required setting left empty is marked in red, and a step that changes the tenant says so.
  • Each step has a title, a note and what to do on an error: stop the workflow, or go on to the next step. A step that's turned off is skipped.
  • Undo and Redo cover every change, moves on the canvas included.
  • Start a workflow empty, or from a change: it reads a CSV file, makes the change for each row and exports the results. Workflows import and export as .json files, and sit in folders of your own.

The steps

Choose a step, then fill in its settings. Steps pass what they find to later steps through variables.

Steps that reach the tenant

  • Get data
  • Run command
  • Bulk change
  • Run report
  • Back up policies
  • Apply a blueprint

Get data runs a read-only Exchange Online cmdlet, such as Get-Mailbox, and saves the results. Run command runs an Exchange Online cmdlet. Bulk change makes any of the changes the Explore pages offer, such as Block sign-in, on a list of targets. Run report saves 1 of a report's tables, and Back up policies saves the tenant's Entra ID and Intune policies as JSON files. Apply a blueprint adds and updates what a blueprint declares, and never removes anything.

Flow

  • If
  • For each
  • Repeat while
  • Wait
  • Stop

For each runs its steps once for each item in a list, and chooses whether a failed item stops the loop. Stop ends the workflow as succeeded or failed, with a message.

Variables

  • Set variable
  • Add to list
  • Add row

Set a value or the result of an expression, add to a list, or build a table a row at a time.

Data

  • Filter list
  • Transform list
  • Sort list
  • Read CSV file

Keep the items that meet a condition, work out a new value from each, sort them, or read a CSV file into rows.

Output

  • Write to output
  • Export to file

Export to file writes a list to an Excel workbook or a CSV file in the tenant's output folder.

Values from step to step

Parameters ask for values when the workflow starts. Variables carry what a step found to the steps after it.

  • A parameter is a value the workflow asks for each time it runs, such as the leaver's name. Its kind is Text, Number, Yes or no, Choice or List, and it can have a default and be required.
  • A step that finds something saves it in a variable. A later step uses it in a setting as {{ shared }}, or a property of 1 item as {{ mb.PrimarySmtpAddress }}.
  • Conditions are written like PowerShell, such as shared.Count -gt 0. Insert, beside a setting, lists the variables you can use, and functions for text, numbers, lists and dates.
  • A run also sets its own variables, such as tenant, testRun (true in a test run) and lastStatus (the status of the last step).

Run a workflow

A run makes the changes, and the change log records each one.

  • Beside the workflow, Variables shows what each step saved, Log sums up the run step by step, and Trace lists every step with its status, item and time.
  • Run asks first, naming the steps that make changes and the tenant: always for a step that blocks or removes something, and for other changes when your settings say so.
  • Each change goes in the tenant's change log, and exported files go to the Workflows folder in the tenant's output folder.
  • Select Stop or press Shift+F5 to end a run. The current step is marked Stopped.
  • Without a window, --workflow "Name" with --apply runs a workflow and makes its changes, and --set Name=Value sets a parameter. See scheduled runs.

Sample workflows

Many samples find items that need attention and export them to Excel. Some can also make a change when you set a parameter. Duplicate a sample to keep the original.

Leavers and starters

  • Offboard a Leaver
  • Leaver Lockdown Across Platforms
  • Set Up New Starters from a CSV File
  • Add Group Members from a CSV File

Accounts and licences

  • Lock Down Stale User Accounts
  • Review Guests Needing Review
  • Reclaim Licences from Disabled Accounts

Mailboxes

  • Find and Clear External Forwarding
  • Grant Full Access to Shared Mailboxes
  • Hide Shared Mailboxes from Address Lists
  • Shared Mailboxes Near the Size Limit
  • Standardise Room Booking Settings

Devices and security

  • Report Stale Managed Devices
  • Sync Non-Compliant Devices
  • Scan Devices Needing Antivirus Attention
  • Resolve Old Informational Incidents
  • Back Up Policies

SharePoint and Teams

  • Review Inactive SharePoint Sites
  • Review Sites Allowing Anyone Links
  • OneDrive Storage Watch
  • Archive Inactive Teams
  • Add a Backup Owner to Teams with 1 or No Owner
  • Assign a Teams Policy from a CSV File

Azure

  • Close Azure Management Ports Open to the Internet
  • Require HTTPS on Azure Web Apps
  • Monthly Azure Review

Talk to us about Altivane

Questions, or pricing? Get in touch.

Contact us