Finding Shadow AI in the Cloud: A Free PowerShell Report from Defender for Cloud Apps Discovery

Studio photograph of translucent glass spheres on a dark reflective surface, some with small amber glowing orbs inside

An inventory of what is installed on a laptop only tells you half the story. Plenty of AI tools never touch the disk. They live in a browser tab, and the only trace is the network traffic. If your clients already feed firewall or proxy logs, or Defender for Endpoint signals, into Microsoft Defender for Cloud Apps, then that traffic has already been catalogued as discovered cloud apps. The question is how to get it out in a form you can put in front of a business owner. That is what ai-shadow-report.ps1 does.

This post covers what the script reports, what it needs, how to run it, how to read the results and where I would be careful. It is the cloud-side companion to the endpoint script I covered in How to Find the AI Apps Hiding on Your Windows Devices with a Free PowerShell Script. Everything about the script comes from the code and the Shadow AI and Cloud Discovery Report documentation, both of which I re-read on 1 December 2026. My own suggestions are labelled as such.

Endpoint inventory versus cloud discovery

The two scripts answer different questions, and I would run both:

Endpoint script (ai-apps-report.ps1)Cloud discovery script (ai-shadow-report.ps1)
Where it looksThe Windows device itself: apps, processes, shortcuts, browser and editor extensionsCloud app discovery data in Microsoft Defender for Cloud Apps, read through Microsoft Graph
What it can seeWhat is installed or running locallyCloud apps your network or devices have talked to, including ones that only live in a browser
What it cannot seeWebsites visited with no local traceAnything that is not in your discovery streams
NeedsPowerShell on the device, no tenant accessA tenant with populated Cloud Discovery data, and Graph consent

One tells you what is on the machine. The other tells you what the machines and the network are reaching. Neither tells you what was typed into them.

What the script does

It is a read-only Microsoft Graph report. According to the script and the documentation, it:

  • loads the built-in AI detection rules, plus an optional catalog file;
  • signs in to Microsoft Graph with the single delegated scope CloudApp-Discovery.Read.All;
  • lists the Cloud Discovery streams you can access, or one you name;
  • pulls aggregated discovered-app data for a 7, 30 or 90 day period;
  • classifies each app as an AI product by name, domain, Defender for Cloud Apps category and keyword rules;
  • optionally looks up which users are associated with each app;
  • writes an app CSV, a user CSV and a self-contained HTML report, and opens the report in your browser unless you tell it not to.

It does not sanction, unsanction, block or change anything. The documentation says so explicitly, and the code only issues read requests to Graph.

Prerequisites

  • PowerShell. Windows PowerShell 5.1 or PowerShell 7. The script has a #requires -Version 5.1 line.
  • The Microsoft Graph authentication module. The script needs Connect-MgGraph, Invoke-MgGraphRequest, Get-MgContext and Disconnect-MgGraph. The documentation installs Microsoft.Graph.Authentication for that.
  • Admin consent. An administrator must grant consent to CloudApp-Discovery.Read.All, and the account you sign in with needs access to the Cloud Discovery data and streams.
  • Discovery data. At least one populated Cloud Discovery stream must exist. The script does not create or import discovery data. If you have not set up Cloud Discovery in Defender for Cloud Apps, there is nothing to report on.

That last point matters most for small business clients. Microsoft’s Defender for Cloud Apps getting started guide describes two main ways to feed discovery data. One is integrating with Microsoft Defender for Endpoint so Windows 10 and 11 devices are monitored, and the other is uploading firewall or proxy logs, either as a one-off snapshot report or through automatic log upload. I have not checked licensing for any of this. Confirm what your clients are entitled to before you promise them a report.

One more thing. The script uses the Microsoft Graph beta Cloud Discovery API, and its own header says the beta API can change and is not supported for production use. Microsoft documents the same endpoints on its discovered apps Graph API page. Treat the output as a point-in-time view and expect that field names may change.

Getting it and running it

This download snippet is my suggestion, built from the repository paths in the links above:

$dest = 'C:\Tools\ShadowAI'
New-Item -ItemType Directory -Path $dest -Force | Out-Null
$base = 'https://raw.githubusercontent.com/directorcia/Office365/master'
Invoke-WebRequest "$base/ai-shadow-report.ps1" -OutFile "$dest\ai-shadow-report.ps1"
Invoke-WebRequest "$base/ai-apps-catalog.json" -OutFile "$dest\ai-apps-catalog.json"
Unblock-File "$dest\ai-shadow-report.ps1"

Install-Module Microsoft.Graph.Authentication -Scope CurrentUser

Read the script before you run it. Then, from that folder:

.\ai-shadow-report.ps1

The default run uses a 30 day lookback and all the discovery streams you can access. It exports every discovered app, queries user associations where it can, uses ai-apps-catalog.json beside the script if it is there, and writes the reports into the script’s folder. It then opens the HTML report. Because the sign-in is interactive, a browser prompt will appear the first time. If your account has not been consented, ask a Global Administrator to approve the permission once.

Parameters

ParameterDefaultWhat it does
-Days30Lookback period. Only 7, 30 or 90 are accepted.
-StreamIdAll accessible streamsLimit the run to one discovery stream. An unknown or inaccessible ID stops the run.
-TenantIdCurrent context, or interactive selectionTenant ID or domain to sign in to.
-EnvironmentGlobalGraph cloud: Global, USGov or USGovDoD.
-OutputDirectoryThe script’s folderWhere the reports go. The folder must already exist.
-CatalogPathai-apps-catalog.json beside the scriptLocal AI catalog file.
-UpdateCatalogOffDownload the catalog first (HTTPS only), cache it if the path is writable, and fall back if that fails.
-CatalogUriThe catalog in the same GitHub repositoryHTTPS address used by -UpdateCatalog.
-AiOnlyOffExport only apps classified as Known or Possible AI, and skip user lookups for the rest.
-AiUsersOnlyOffExport all apps, but look up users only for AI-classified apps. Faster on large tenants.
-SkipUsersOffSkip user lookups. The user CSV has a header row only.
-NoLaunchOffSave the HTML report without opening it.
-PassThruOffReturn a summary object, including report paths, counts and warnings.
-WhatIf / -ConfirmThe script supports both. -WhatIf prevents the Graph connection and the export.

Examples

# AI-only app export over 30 days
.\ai-shadow-report.ps1 -Days 30 -AiOnly

# Refresh the AI catalog first
.\ai-shadow-report.ps1 -UpdateCatalog

# Look up users only for AI-classified apps
.\ai-shadow-report.ps1 -AiUsersOnly

# One stream, 90 days, no browser (the ID below is a placeholder)
.\ai-shadow-report.ps1 -Days 90 -StreamId "00000000-0000-0000-0000-000000000000" -NoLaunch

# Choose the output folder and capture a summary
$result = .\ai-shadow-report.ps1 -OutputDirectory "C:\Reports\ShadowAI" -NoLaunch -PassThru
[PSCustomObject]@{
    KnownAI    = $result.KnownAiAppCount
    PossibleAI = $result.PossibleAiAppCount
    Unsanctioned = $result.UnsanctionedAiCount
    Warnings   = $result.Warnings.Count
    Report     = $result.HtmlReportPath
}

# Preview without connecting
.\ai-shadow-report.ps1 -WhatIf

Create the output folder first. The script validates it and will not make one for you.

How it decides an app is AI

Each discovered app gets one of these classifications, based on the app name, its domains and its Defender for Cloud Apps category:

  • Known AI-capable product. The name or a domain matches a catalog product rule or a known AI domain, or the Defender category is one of the AI categories the script recognises: generativeAi, aiModelProvider, mcpServer and clientAiApp. The current built-in catalog (version 2026.11.30-builtin) has 74 product rules, plus a built-in list of known AI domains.
  • Possible AI product. No known match, but the catalog’s keyword pattern matched the app name or a domain. Terms such as generative AI and large language model are examples.
  • No AI match. Nothing matched.

The same catalog file is shared with the endpoint script. A custom catalog is a JSON file with a products array (each entry has a product and a pattern) and an optional keywordPattern. A custom entry replaces a built-in product of the same name, and new products are added. Both documents are clear that a match is evidence for investigation, not proof that a person used an AI feature or that anyone approved the app.

What you get

The app report

The app CSV and the HTML dashboard carry the same fields. The ones I look at first are:

  • AppName, Domains and Category, which is what the app is and where it lives.
  • AiConfidence, AiProducts and AiEvidence, which is the classification, the product it was matched to and the reason.
  • SanctionStatus and Tags, taken from the tags in Defender for Cloud Apps, as Sanctioned, Unsanctioned, Monitored or Not tagged.
  • RiskScore, the Defender risk score when it is available.
  • UserCount, IpAddressCount, TransactionCount and the upload and download bytes, which show how much the app is used.
  • StreamName, LogDataProvider and LastDataReceivedDateTime, which tell you which source the data came from and how fresh it is.

The user report

Unless you skip it, the script asks Graph which users are associated with each eligible app. It skips an app if its user count is zero, or its stream does not expose user names. The user CSV lists the app, its AI classification and sanction status, the risk score and the user identifier that Graph returned. The HTML report shows at most 500 user associations. The CSV is the complete export.

The HTML dashboard

The dashboard is a single offline file. It has summary cards (including exported apps, known AI, possible AI and unsanctioned AI), search and filters for confidence, sanction status and stream, sortable tables, CSV and JSON downloads of the visible rows, light and dark themes and print to PDF. It also lists stream coverage and any operational warnings, so read those before you trust the numbers.

Files are named with a millisecond timestamp, for example shadow-it-apps-yyyyMMdd-HHmmss-fff.csv, and the matching shadow-it-users and shadow-it-report files. The script stages files under temporary names and only publishes them after all three are generated. It will not overwrite an existing report. CSV values that start with a formula character are prefixed with an apostrophe, so opening them in a spreadsheet is safer.

Reading the results

  • Start with unsanctioned AI. Apps classified as AI and tagged Unsanctioned in Defender for Cloud Apps are the obvious first conversation. The script reports that count on the console and in the dashboard.
  • Then look at Not tagged. An AI app that nobody has tagged yet is exactly the shadow part. It tells you where your governance has not caught up.
  • Treat Possible matches as leads. Read the evidence column before you decide anything.
  • Never add up traffic across streams. Streams can overlap, so the same app may appear in more than one. The script and the documentation both warn about this.
  • Never divide app totals across users. The API provides app-level traffic only, not per-user traffic, so the numbers cannot tell you how much any one person sent.
  • Blank transfer fields are normal. Some sources do not provide volume information.

Running it regularly

The documentation does not describe scheduled or unattended use. The script signs in interactively with the delegated scope, and I could not find an app-only or certificate sign-in option in it. Everything in this section is my own suggestion and I have not tested it:

  • Run it monthly by hand, or as part of a client review, with -NoLaunch -PassThru and a dated output folder. Keep the reports so you can compare one month with the next.
  • Use -Days 30 for a monthly look and -Days 90 for a quarterly one, and keep the same stream selection each time so the numbers are comparable.
  • Compare the lists of AI apps month to month. New names and rising user counts are what matter. The tool does not do that comparison for you.
  • If you want a fully unattended job, you would need a sign-in method the script does not currently offer, so I would not try that without checking the code and the Graph permissions model first.

Privacy, limits and caveats

  • Reports are sensitive. They can contain tenant IDs, app names, domains, user identifiers, IP usage counts and traffic data. Store and share them in line with your privacy and retention requirements, and take particular care with the user CSV.
  • It only sees what discovery sees. The data comes from the selected streams and period. How complete that is depends on how discovery is set up for each client.
  • Classification is heuristic. Expect false positives and false negatives.
  • The API is beta. Field names and behaviour can change.
  • Your view depends on your role. A signed-in user sees only the data their tenant and Defender roles permit.
  • No enforcement. Sanctioning, blocking and policy all happen elsewhere, in Defender for Cloud Apps and your other controls.
  • Air-gapped environments. Skip -UpdateCatalog. The built-in catalog and a local catalog file still work.

How I would use it with clients

This is my view, not part of the script. I would run the endpoint inventory and the cloud discovery report together, and take both to the client as one story: here is what is installed, and here is what your network is actually reaching. The overlap is where the real shadow AI sits, and the gaps tell you where each tool is blind. From there the conversation is about policy. Which AI tools are approved, which are not, and who owns the decision. The reports give you the evidence. They do not give you the answer.

The takeaway

You do not need a new platform to start seeing shadow AI. If a client already has Defender for Cloud Apps discovery running, the data is sitting there, and one read-only script turns it into a report a business owner can read. If they do not, setting up discovery is the real first step. Either way, start with a pilot tenant, read the warnings and treat the first report as a baseline, not a verdict.

Sources (checked 1 December 2026)

How to Find the AI Apps Hiding on Your Windows Devices with a Free PowerShell Script

Antique natural-history plate with neatly arranged hand-painted leaves, ferns, seed pods, beetles and butterflies on aged parchment

Ask most business owners which AI tools their staff use and you will get the answer that is in the policy. Ask the laptops and you will get a different one. People install a desktop chat app, add a browser extension that rewrites their emails, or drop an AI assistant into their code editor, and none of it goes through IT. I wrote a PowerShell script to answer the laptop version of the question: ai-apps-report.ps1. This post covers what it looks at, how to run it, how to read the report and what it will not tell you.

Everything below comes from the script itself and from the Windows AI Application Inventory documentation, which I re-read on 30 November 2026. Where I add my own suggestions, I say so.

Why inventory AI apps at all

You cannot govern what you cannot see. If you are working through Copilot readiness, data classification or an AI use policy, the first question is simple: what is already on these devices? Staff who paste client data into a tool you have never heard of are a data protection problem whether or not the tool is any good. An inventory will not tell you what people typed into those tools, but it does tell you which tools are present, on which machine, under which user. That is enough to start the right conversation.

What the script is, and what it is not

It is a local, read-only inventory for Windows endpoints. According to the script header and the documentation:

  • It installs no software and no modules, and changes no system settings.
  • It does not mount unloaded user registry hives, and it does not upload device data. The only network use is the optional catalog refresh, covered below.
  • It writes a self-contained HTML report that works offline, and opens it in your default browser unless you tell it not to.
  • It needs Windows PowerShell 5.1 or PowerShell 7 on Windows, with no additional modules. The script checks the operating system and stops with an error on anything other than Windows.
  • It runs as a standard user. Administrator is optional, and I cover why you would want it in a moment.

It is not a block list, an enforcement tool or proof of usage. It reports evidence that something AI-related is present. I will come back to the limits, because they matter for how you use the results.

What it looks at: six stages

The console shows progress through six numbered stages. Here is what each one covers, based on the script and the documentation:

StageWhat it inspects
1/6 Installed applications and Store packagesThe HKLM and HKCU Uninstall registrations (including the 32-bit view), other user hives that are already loaded, and Microsoft Store packages. Store packages are read for all users when elevated, and for the current user when not.
2/6 Running processesA snapshot of running processes, checking the name, path, file description and file version.
3/6 Portable and per-user locationsProgram Files, Program Files (x86) and ProgramData, plus per-profile folders such as AppData\Local\Programs, Desktop and Downloads. It also looks for command-line tools on the PATH. The default list is ollama, aider, claude, codex, gemini, gpt4all, lmstudio, goose, open-webui, llama-cli and koboldcpp, plus any the catalog adds.
4/6 Start Menu and web app shortcutsStart Menu shortcuts for all users and each profile, including browser web apps (PWAs) launched with an app ID. These are labelled as an application shortcut or a browser web app shortcut.
5/6 Browser extensionsExtensions across Chromium-based browsers (Chrome, Edge, Brave, Arc, Perplexity Comet, Vivaldi, Opera and others) and Firefox-based browsers (Firefox and Zen). It reads whether each extension is enabled or disabled where the browser records that.
6/6 Code editor extensionsExtensions installed for Visual Studio Code and the Insiders build, Cursor, Windsurf and Trae.

The documentation lists 16 browser variants in total, with Chrome Stable, Beta and Canary and Edge Stable, Beta, Dev and Canary counted separately. That is a lot of ground for one script, and it is the part I find most useful, because browser and editor extensions are exactly where AI tools turn up unannounced.

How it decides something is AI

Detection is catalog driven. Every finding carries a match type, and the two types mean different things:

  • Known AI-capable product. A name or identifier matched a rule in the catalog. The built-in catalog in the current script (version 2026.11.30-builtin) has 74 product rules, covering things like ChatGPT, Claude, Copilot, Gemini, Grok, DeepSeek, Mistral, Perplexity, Ollama, LM Studio, Cursor, Windsurf, Grammarly and ComfyUI. The rules use word boundaries and anchors to keep false positives down.
  • Possible AI product. No product rule matched, but a keyword pattern did. It looks for phrases such as artificial intelligence, generative AI, large language model, AI assistant and powered by AI in the name, description, publisher or comments. The phrase that matched is shown in the Evidence column, so you can judge it yourself.

The catalog is layered. The script ships with the built-in offline baseline. If an ai-apps-catalog.json file sits next to the script, or you point -CatalogPath at your own, its entries are merged with the built-in rules, and if the file is missing or unreadable the script falls back to the built-in rules. Add -UpdateCatalog and the script downloads the latest catalog over HTTPS first, with a 15 second timeout, saves it to the catalog path if that location is writable and falls back if you are offline. The script rejects a catalog address that is not HTTPS.

A custom catalog is a JSON file with a version, an updated date, a list of products (each with a name and a regular expression) and optionally extra command-line tools. Invalid regular expressions are skipped and reported as scan warnings rather than stopping the run. This is handy if you want to flag a line-of-business tool, or an AI product that is not yet in the shared catalog.

Getting it and running it

Download the script and, ideally, the catalog into the same folder. This download snippet is my suggestion, built from the repository paths in the links above:

$dest = 'C:\Tools\AI-Inventory'
New-Item -ItemType Directory -Path $dest -Force | Out-Null
$base = 'https://raw.githubusercontent.com/directorcia/Office365/master'
Invoke-WebRequest "$base/ai-apps-report.ps1"   -OutFile "$dest\ai-apps-report.ps1"
Invoke-WebRequest "$base/ai-apps-catalog.json" -OutFile "$dest\ai-apps-catalog.json"
Unblock-File "$dest\ai-apps-report.ps1"

Windows may block a downloaded script depending on your execution policy, which is why I added Unblock-File. Read the script before you run it, as you should with anything you pull from the internet, including mine. Then the simplest run is:

cd C:\Tools\AI-Inventory
.\ai-apps-report.ps1

That scans the current user, writes AI-apps-<yyyyMMdd-HHmmss>.html in the current folder and opens it. These are the parameters:

ParameterWhat it does
-OutputPathWhere to save the report. Defaults to a timestamped file in the current folder. It must end in .html or .htm, and missing parent folders are created.
-NoLaunchSaves the report without opening the browser. Use it for anything unattended.
-ElevateAsks Windows for administrator rights (a UAC prompt) before scanning. If you decline, the script reports that and does not run a partial scan.
-CatalogPathPath to a JSON catalog. Defaults to ai-apps-catalog.json next to the script.
-UpdateCatalogDownloads the latest catalog before scanning, as described above.
-CatalogUriThe HTTPS address used by -UpdateCatalog. Defaults to the catalog in the same GitHub repository.
-PassThruReturns a summary object to the pipeline: the report path, evidence count, distinct name count, warning count, catalog version and source, and the full list of findings.

A few examples, taken from the documentation:

# Refresh the catalog first, then scan
.\ai-apps-report.ps1 -UpdateCatalog

# Broader coverage: other users' profiles and all-user Store packages
.\ai-apps-report.ps1 -Elevate

# Unattended run (the documentation labels this for RMM or Intune execution)
.\ai-apps-report.ps1 -OutputPath 'C:\Reports\AI-inventory.html' -NoLaunch

# Use your own catalog and work with the results in PowerShell
$summary = .\ai-apps-report.ps1 -CatalogPath 'C:\Config\custom-ai-catalog.json' -NoLaunch -PassThru
$summary.Findings | Format-Table Name, Kind, Version, User, Confidence

Standard user or administrator?

Both work, but they see different things. As a standard user, the script scans your own profile and reports a permissions warning, because other profiles and all-user Store packages may be out of reach. On a shared PC or a server, that is a real gap. When the script is not elevated, it prints two options in the console and saves the same text in the report: re-run with -Elevate, or open PowerShell with Run as administrator and run the command it prints. The second option writes a separate AI-apps-admin-<timestamp>.html in the same folder and keeps flags such as -NoLaunch and a custom catalog path. For a single-user laptop, the standard run is usually enough to get started.

Reading the report

The HTML report is the main deliverable. It has summary cards for evidence records, known AI-capable matches, possible matches, distinct matched names, coverage warnings and scan duration. Below that is a table you can search, filter by evidence type and match type, and sort by name, type, version, user, source, match type, evidence, state, ID or location. You can export the filtered rows to CSV or JSON, switch between light and dark themes and print to PDF. The CSV export is built to be safe to open in a spreadsheet.

A few habits make the results easier to act on:

  • Evidence records are not apps. One product can appear several times, for example as an installed app, a running process and a Start Menu shortcut. Use the distinct names count to see how many different products you are dealing with.
  • Start with Known matches. Those are the rules someone has deliberately written. Treat the Possible matches as leads and read the Evidence column before you decide.
  • Check the State column for extensions. A disabled browser extension is a different conversation from an enabled one.
  • Read the scan warnings and source coverage. Each source shows as scanned, partial or partial / failed. A report with warnings is telling you where the blind spots are, so do not skip it.

The console also prints a summary by evidence type (installed application, store application, running process, application path candidate, command-line tool, browser extension and editor extension), so you can see the shape of a run before you open the file.

Running it across a fleet

The documentation shows the unattended pattern (-OutputPath with -NoLaunch) and describes it as suitable for RMM or Intune execution. It does not describe a fleet collection or reporting process, so the rest of this section is my own suggestion rather than anything in the docs, and I have not tested it:

  • Deploy the script and catalog through your RMM or Intune as a script or a scheduled task, and run it with -NoLaunch so nothing pops up on a user screen.
  • Write each report to a path that includes the device name, or have your tool collect the file, since the script names the report by timestamp only. The report records the computer name inside it.
  • Use -PassThru if you want counts and findings returned to your tooling instead of reading HTML. The findings carry Name, Kind, Version, User and Confidence, which is enough to build a simple cross-device view.
  • Check how your tool runs the script. Whether it runs as the signed-in user or as SYSTEM changes whose profile is scanned, and I would test that on a pilot device before trusting the numbers.
  • Run it on a schedule, monthly to start with, and compare the distinct names from one run to the next. New names are your conversation starters.

If you use an agent such as Grok Bot to help with reporting, a sensible job is to read the collected summaries, list names that are new since last time and draft the questions to ask the client. Keep a human deciding what to do about them.

Limits and privacy

The documentation is upfront about what an inventory like this cannot see, and I would repeat it to every client before they read the report as gospel:

  • Presence is not use. An app on the disk does not prove anyone opened it, paid for it or sent data to it.
  • Websites are invisible unless there is a local trace. An AI site that someone just visits in a browser, with no extension or web app shortcut, will not show up, and neither will browser history or bookmarks.
  • Some locations are out of scope: custom portable paths, extensions installed outside the standard profile folders, WSL distributions, Docker containers, Python virtual environments and AI features built silently into general software.
  • It is a point in time snapshot, and the catalog is only as current as the rules in it.

On privacy, the report contains the computer name, local usernames and file and registry paths. According to the documentation it does not contain credentials, browser history, prompts, messages or document contents. That is still information about your people and their machines, so store and share reports in line with your security policy. If you are an MSP, that includes how you handle them across clients.

Where it fits with Intune, Defender and Purview

This is my view, not a feature of the script. It does not enforce anything and it does not feed Intune, Defender or Purview. What it gives you is a quick, vendor-neutral look at what is on a device, including editor extensions and browser web apps, that you can run without onboarding the device to anything. I use that kind of snapshot to decide where to point the tools that do enforce: which apps to allow or block, which users need a conversation, and whether the AI use policy matches reality. Run it first, decide second, then configure your management and data protection tools to match the decision.

The takeaway

Shadow AI is not a technology problem to solve with a block list on day one. It is a visibility problem, and visibility is cheap. One script, no modules, no installs and no uploads gets you a report you can put in front of a client and say: here is what is actually on your machines. Start with a pilot on a few devices, read the coverage warnings, and decide what you want to do about the names you did not expect. If you spot a missing product or a false positive, the catalog is the place to fix it.

Sources (checked 30 November 2026)

What Happens to Community When Everyone Has Their Own AI Bot?

Technical professionals working individually at laptops while two colleagues talk together in the background

For many routine technical questions, asking a bot now feels quicker and more useful than posting in a forum and waiting. The answer arrives in seconds and is shaped to my exact situation. So it is worth asking a harder question. When everyone is wrapped up in their own AI assistant, what happens to the technical communities we used to lean on?

The fix nobody else sees

Picture an admin chasing a Teams policy that refuses to apply to a group of users. They ask their bot, get a PowerShell snippet, adjust it for their tenant, test it, and the problem goes away. Except the context, the dead ends and the test results now live in one private chat. Nobody else learns that the policy needed time to replicate, or that the first script would have hit the wrong users.

In the old forum model, that same question would have been public. Someone would have answered, someone else would have corrected them, and a dozen silent readers would have filed it away for later. The value was the visible reasoning, the disagreement and the record left behind.

AI assistants draw heavily on shared documentation and published knowledge. If more of the hard-won lessons stay private, I wonder what the next generation of answers, human or machine, will have to work from.

Support was only part of the point

Forums and user groups were never only help desks. Asking a question was how many of us met people, found mentors, and earned a reputation by giving good answers. A good AI answer is helpful. It does not automatically create trust, judgement or belonging, and it cannot be accountable for the advice in the way a respected peer is.

I am not arguing that people should wait longer for help to keep forums busy. I wrote earlier that AI isn’t killing human engagement, lazy humans are, and I still think the choice sits with us rather than the tool.

What brings people together now?

If quick answers stop being the main reason to show up, communities need a different reason. A few that seem worth the effort:

  • Share tested conclusions, not raw AI output. After the bot helps you fix an Entra or Intune problem, post a short, sanitised write-up of what actually worked, what failed and why. Strip out customer names, tenant details and secrets.
  • Work on real problems together. Live troubleshooting, shared labs and reviews of each other’s scripts build the kind of judgement a private chat rarely does.
  • Make human conversation deliberate. Mentoring, user groups and small peer circles have always taken effort. Now they need someone to deliberately organise them.
  • Earn attention. Bolting a chatbot onto a forum does not make it a community. People return where they find insight and people they respect.

Picture a group of MSP peers comparing what their bots suggested with what actually happened in a Microsoft 365 tenant. One fix worked, another broke sign-ins, a third needed a licence nobody mentioned. That is the conversation worth having: verified evidence, context and judgement that others can question, not more autogenerated answers. It is the kind of shared capability that lasts.

The choice in front of us

If technical communities weaken, it may not be because AI has failed. It may be because it handles enough routine questions that we have fewer practical reasons to talk to each other. That leaves the harder, more human reasons to gather, and those only survive if people choose to contribute.

So when your bot hands you the answer in thirty seconds, what will you give back to the people who might hit the same problem tomorrow?

How to Automatically Block External Meeting Bots in Microsoft Teams

IT administrator configuring Teams meeting protection

External AI note-takers and meeting bots are turning up in more and more Teams meetings, often invited by someone outside your organisation and often without anyone really thinking about where that recording or transcript ends up. Microsoft has been steadily adding controls for this, and the latest one is a Teams meeting policy option that automatically blocks identified external meeting bots from joining. Here’s what it does and exactly how I’d roll it out.

What’s changing

This is covered in Message Center post MC1459141 (Roadmap ID 566201). Today, Teams can already detect external bots, mark them in the lobby and require the organiser to admit them. The new option goes one step further: when it is enabled, identified external meeting bots are simply prevented from joining meetings governed by that policy.

The key points from Microsoft are:

  • It’s a new option in the existing Manage bots meeting protection settings in Teams meeting policies.
  • It is off by default. Nothing changes unless an administrator turns it on.
  • It can be assigned to specific users or groups through normal meeting policy assignment.
  • Existing bot detection and visibility for organisers and administrators stays the same.
  • Targeted Release started mid-September 2026 and was due to complete by late September. General Availability began in early October 2026 and is now expected to complete by the end of November 2026 (timeline updated 3 November).

For background, Microsoft Learn’s Manage external bots and their access to meetings page explains how detection works, using infrastructural and behavioural signals during the join process. Detection isn’t perfect, so a bot that isn’t identified can still get in, and occasionally a human may be misclassified.

Before you start

  • You need the Teams Administrator or Global Administrator role.
  • The option may not appear yet if the rollout hasn’t reached your tenant. If you don’t see it, check back later rather than hunting for a workaround.
  • I haven’t confirmed the exact wording of the new toggle across tenants, so look for the option to automatically block identified external meeting bots inside the Manage bots section rather than expecting a specific label.
  • Remember this may block note-taker and recording bots that some of your people rely on. That’s why piloting matters.

Step-by-step: enable auto-block

  1. Sign in to the Teams admin center at https://admin.teams.microsoft.com.
  2. Go to Settings & policies, then Meeting policies.
  3. Choose where to apply it. For a pilot (recommended), select Add to create a new policy, such as Pilot – Block meeting bots. To apply it to everyone, open Global (Org-wide default).
  4. Scroll to the Manage bots section.
  5. Turn on the option to automatically block identified external meeting bots.
  6. Select Save.
  7. If you created a pilot policy, assign it to the pilot users or a group. You don’t need to assign the Global policy, as it already applies to everyone without another policy.
  8. Wait a few hours for the policy to apply. Changes to meeting policies aren’t instant.
  9. Test it. Schedule a meeting as a pilot user and have an external bot try to join. It should be blocked rather than sitting in the lobby waiting for approval.

Doing it with PowerShell

If you prefer scripting, the Set-CsTeamsMeetingPolicy documentation lists an ExternalBotAccessMode parameter with three values: AllowAllBots, RequireApprovalWhenDetected (the default) and BlockDetectedBots. Using the Microsoft Teams PowerShell module:

Connect-MicrosoftTeams
New-CsTeamsMeetingPolicy -Identity "Pilot-BlockBots"
Set-CsTeamsMeetingPolicy -Identity "Pilot-BlockBots" -ExternalBotAccessMode BlockDetectedBots
Grant-CsTeamsMeetingPolicy -Identity "user@yourdomain.com" -PolicyName "Pilot-BlockBots"
Get-CsTeamsMeetingPolicy -Identity "Pilot-BlockBots" | Select-Object Identity, ExternalBotAccessMode

As always, test the cmdlets in your own tenant first, as parameter availability can lag the rollout.

Microsoft’s recommendations

Microsoft suggests the following if you plan to enable automatic blocking:

  • Review your organisation’s use of meeting bots and automated meeting applications.
  • Evaluate the feature with a pilot group before broader deployment.
  • Review existing Teams meeting policies and decide which users or groups should receive the policy.
  • Update internal documentation and help desk guidance.
  • Communicate the change to meeting organisers and users who rely on automated meeting bots.

My take

For most businesses I work with, this is a sensible control to have, but it’s not one to flip on for the whole tenant on day one. Find out who is actually using external note-takers, pilot it with a group that isn’t, then widen it once you know what breaks. Pair it with a clear position on which AI meeting tools are approved, because blocking the unapproved ones works best when people know what they should be using instead.

How to Update All Apps on a Windows Device with Winget

IT technician relaxing with a coffee while a laptop updates in teal and amber light

Keeping every app on a Windows device up to date is one of those jobs everyone agrees matters and nobody enjoys. Browsers, PDF readers, runtimes, utilities, each with its own updater, or none at all. Out-of-date apps are also a favourite way in for attackers. The good news is that Windows already includes a tool that can update most of them in one hit. It’s called winget.

What is winget?

Winget is the command-line client for the Windows Package Manager. It lets you search for, install, upgrade and remove applications from the command prompt or PowerShell, using community and Microsoft sources. Think of it as one updater for many apps.

Step 1: Check winget is installed

On current versions of Windows 10 and 11, winget comes with the App Installer package from the Microsoft Store. Open Terminal or PowerShell and run:

winget --version

If you get a version number back, you’re good to go. If not, install or update App Installer from the Microsoft Store and try again.

Step 2: See what needs updating

Before changing anything, have a look. Running upgrade on its own lists every app with an update available, along with the installed and available versions:

winget upgrade

I always do this first. It’s a quick health check of a machine, and often a surprising one.

Step 3: Update everything

To upgrade every app that has an update available:

winget upgrade --all

For a hands-off run, add the switches that suppress prompts:

winget upgrade --all --silent --accept-package-agreements --accept-source-agreements

Here’s what those do:

  • --silent runs installers without showing their UI
  • --accept-package-agreements accepts app licence agreements so you aren’t prompted
  • --accept-source-agreements accepts the source agreements so you aren’t prompted
  • --include-unknown also upgrades apps whose current version winget can’t determine

That last one is worth knowing. Some apps don’t report a version, so winget skips them during --all unless you add --include-unknown.

Step 4: Update just one app

Sometimes you only want to update a single app. Grab its ID from the winget upgrade list and target it directly:

winget upgrade --id Microsoft.PowerToys

Step 5: Run it elevated

Many apps are installed for all users, so their installers need administrator rights. Run Terminal as administrator before running winget upgrade --all, otherwise you’ll be hit with UAC prompts or failures for machine-wide apps.

Step 6: Pin apps you don’t want touched

Not everything should update automatically. A line-of-business app might need a specific version, or a tool may need testing first. Winget handles this with pins:

winget pin add --id Microsoft.PowerToys

A standard pin excludes the app from winget upgrade --all but still lets you upgrade it deliberately. Add --blocking to stop upgrades altogether until the pin is removed, or --version with a wildcard, such as 0.70.*, to keep it within a version range. Use winget pin list to see current pins and winget pin remove to clear one.

Step 7: Schedule it

Running this by hand is fine for your own machine, but the real win is automation. On a single device, create a Task Scheduler task that runs the silent command with highest privileges on a regular schedule.

For managed fleets, I’d look at Intune instead. Intune remediations can run a detection script to check for available upgrades and a remediation script to apply them. One caution: winget is installed per user, so running it under the SYSTEM account needs extra care with how you call it. Test thoroughly on a pilot group before rolling out widely.

The MSP angle

For MSPs, winget is a simple way to close a common security gap across every client device. Third-party apps are often the forgotten part of patching, sitting outside Windows Update entirely. A standard winget routine, deployed through Intune and backed by pins for anything sensitive, gives you consistency without buying another tool.

It also makes a nice reporting story. A regular winget upgrade list shows clients exactly what was out of date and what you fixed. And if you’re using Copilot or other AI tools to help write and review scripts, winget commands are a great place to start because the syntax is clean and well documented.

Start with your own machine today. Run winget upgrade, see what turns up, and I suspect you’ll be convinced.

AI Doesn’t Take Your Job, It Extends Your Wingspan

Curious woman working on an electronics project at a workbench in teal and amber light

Every week I hear the same fear. AI is coming for our jobs. I understand why, but I think it misses what’s really happening. AI doesn’t take your job. It extends your wingspan.

Think of wingspan as your reach. It’s how much ground you can cover, how many roles you can step into and how many skills you can put to work. For most of us, that reach has always been limited by time, training and what we happened to learn along the way. AI stretches it further than we’ve ever been able to stretch it on our own.

Your reach used to stop at your training

Doing something new used to mean years of practice or paying someone who already had the skill. Want to write well, code, design, analyse data or run a project? You either invested heavily or stayed in your lane.

AI widens that lane. Copilot can help you draft a clear proposal in Word, build a formula or pivot in Excel, turn rough notes into a PowerPoint deck or tame a messy Outlook inbox. You don’t need to be a writer, an analyst or a designer to get a solid first result. Your wingspan now reaches into territory that was out of range.

That doesn’t make expertise worthless. Experts extend their wingspan too. It means the distance between what you can do and what you’d like to do has shrunk for everyone.

Stretching my own wings

I’ve felt this myself. Lately I’ve been building a robot arm that plays tic-tac-toe, with AI helping me write the code, and I even published a worked guide to how minimax plays perfect tic-tac-toe on CIAOPS Labs. That project was well outside my reach not long ago.

Scripts are the same. I now write PowerShell to monitor Microsoft 365 tenants, with AI doing much of the heavy lifting. I described how that kind of assistant changed my day in Finally, AI That Just Gets Things Done. I still have to understand the result, test it and own it, but my range is far wider than it was.

Curiosity decides how far you fly

If AI gives everyone a longer wingspan, what separates people? Whether they actually spread their wings. The people who thrive ask what else is now within reach, then go and try it.

The traits that matter most:

  • Curiosity to explore tasks beyond your usual role
  • Willingness to learn enough to judge the output
  • Persistence when the first attempt falls flat
  • Honesty about when you still need an expert

Those who assume a task isn’t for them will fall behind. Not because AI replaced them, but because someone curious flew into that space first.

What a wider wingspan means for MSPs

For MSPs, this is a real shift. Picture a technician who’s never written marketing copy producing a solid client newsletter with Copilot. Or a service desk lead building a Power Automate flow without being a developer. Or an owner analysing profitability in Excel without hiring an analyst. Each person covers more ground, so the whole team covers more ground.

It’s also a message worth taking to clients. Their staff can reach much further than they think, as long as they’re encouraged, trained and given safe tools inside Microsoft 365. Helping them stretch, with the right guardrails and a bit of patience, is valuable work that builds trust.

So stop asking whether AI will take your job. Ask how far your wingspan now reaches. Then spread your wings and go and use it.

How to Set Up a PowerShell Bot in Grok Bot as a Shared Tool

Two colleagues reviewing a laptop in a quietly lit office, teal and amber light on a blank screen

Most MSPs already have a folder of PowerShell scripts that do the real work: connect to a tenant, check a setting, produce a report. The awkward part is not writing the next script. It is getting a consistent, least-privilege way to run the ones you already trust, without giving every assistant in your toolkit its own path into Microsoft 365.

I keep a dedicated PowerShell bot in Grok Bot for this. It is not there to chat about PowerShell in general. It is a tool. When a security monitor, or my Chief of Staff, needs a script run, they ask that bot to do the job and report back. The rest of my bots stay out of the tenant.

That sounds simple, and once it is set up it is. The work is in giving the bot a clear job, pointing it at a script repository, and letting it sign in with a certificate so later runs can go without a prompt. I will walk through that setup, then use the Microsoft Defender for Office 365 Recommended Configuration Analyzer (ORCA) as the worked example.

Why a dedicated PowerShell bot

If every bot can run scripts, every bot needs tenant access, and every bot can make a change. I would rather have one specialist with a tight set of rules: use the scripts in the repo before writing anything from scratch, stay read-only unless I say otherwise, ask before anything that changes a tenant, and report back in plain English.

Other bots can then call it when they need it. That is not a theory. A marketing bot has asked mine for a read-only inventory of a script repo. A chief-of-staff bot has sent it backup and investigation jobs. The PowerShell bot does the work and replies. I wrote earlier about using a specialist bot to investigate a worrying mailbox change. This is the same idea, pointed at scripts.

1. Create the bot and give it a clear role

You can do this in chat. The only app locations I will point you to are ones I have verified: the per-agent info pane, and Settings if you need to check the timezone later.

Click the agent’s name in the chat header, or use Cmd+Shift+I, to open the per-agent info pane. The gear beside the X opens the per-agent settings for avatar, name, title and description. Call it PowerShell, or whatever name you will use when another bot refers to it, and give it a description that states the job.

You can also set the role in chat:

Set this bot’s name to PowerShell and set the description to: You are a specialist PowerShell tool for an Australian MSP. Other bots will ask you to run scripts and report back. Prefer scripts from my GitHub repositories, and pull the latest copy before you run one. Run scripts on your computer. Use certificate-based app-only sign-in for unattended Microsoft 365 work. Stay read-only unless I clearly ask for a change. Before anything that changes a tenant, tell me exactly what you will do and wait for approval in this chat. Do not invent a script if a repo already has one that fits. Report results in plain English, and say what you could not do.

Save the same rules as a standing instruction in the first conversation. Be explicit that relayed approvals from another bot do not count for tenant changes. That is a rule I have had to enforce, and it is the right one.

2. Point it at a GitHub repo

A PowerShell bot without a script library will invent helpers. I would rather it used the scripts I already maintain. Mine lives at https://github.com/directorcia/Office365. Tell the bot that in chat:

Add https://github.com/directorcia/Office365 to your list of script sources. When a job needs a script, check that repo first, pull the latest copy, and run it from there if it fits. Do not write a new script if one in the repo already does the job. Do not commit or push anything unless I ask.

That repo is public, so the bot can clone and pull it on its own computer without a token. If you also have a private repo, the safest approach I have used is a fine-grained GitHub token limited to that one repository, with Contents set to Read-only. GitHub turns on Metadata read-only by itself. Leave every other permission at No access. The token is for clone and pull only, and it should not be stored in the repo.

I am not going to invent a GitHub settings screen in the Grok Bot app. I set this up in chat, then confirmed the bot could see the repo on its computer. Before each run, I expect it to pull the latest copy.

The Office365 repo includes the Linux certificate connect scripts I use for headless Exchange Online and SharePoint. I wrote about those in New scripts: Headless SharePoint and Exchange Online connections on Linux, built for agents. For Exchange, the script is o365-connect-exo-cert-linux.ps1.

3. Give it a headless way to sign in

Interactive sign-in is fine for a one-off on your own PC. It is a poor fit for a bot. Nobody is sitting at the bot’s computer to complete a browser prompt, and a prompt that nobody can answer will just hang. Certificate-based, app-only sign-in is the unattended path Microsoft documents for Exchange Online PowerShell.

The pattern I use is:

  • Generate the certificate on the bot’s computer, so the private key never leaves that machine.
  • Upload the public certificate to an app registration in Microsoft Entra ID.
  • Grant the Exchange.ManageAsApp application permission, with admin consent.
  • Assign a role that matches the work. For a read-only assessment such as ORCA, that is Global Reader or the Exchange View-Only Organization Management role group, not a full administrator role.

The connect script can also provision the Entra app. Read what it will assign before you use that option. A provision step that grants a broad Exchange role is the wrong default for a bot that mostly reads a tenant. I would rather start with a view-only role and add more later, with a human still in charge of the grant.

The first time, you will need to sign in once with a device code so the app can be created and consent can be granted. After that, the bot should connect with the saved profile and the unattended switch. On the Linux script, that is -UseCertificateAuth with -Headless (an alias of -noprompt):

./o365-connect-exo-cert-linux.ps1 -UseCertificateAuth -ProfileName YourProfile -Headless

Keep the PFX password out of the repo and out of chat prompts. The script will take it from a secret or from an environment variable you inject. Each command on the bot’s computer can start a fresh PowerShell process, so either reconnect each time or keep a session open per tenant. A different tenant needs its own connection.

4. Let other bots call it

This is the point of the setup. You do not want your news bot, or your security monitor, running Exchange cmdlets itself. You want it to ask the PowerShell bot.

I do not have a separate settings page I can point you to for that. What I can verify is simpler. You ask the other bot, in its own chat, to send the job to the PowerShell bot and report back. In a group chat, the per-agent info pane – the same one you open from the agent name in the header, or with Cmd+Shift+I – includes Members, and you can @mention a bot by name.

Here is the kind of prompt I would give a security monitor or a chief-of-staff bot:

Ask the PowerShell bot to run ORCA read-only against the tenant I name, using the Exchange certificate connection. It should install or update the ORCA module if needed, generate the report, summarise the results in plain English, and send back the HTML report. It must not change anything in the tenant. If it hits a permission gap, it should say so and stop, without granting itself extra access.

The PowerShell bot then does the work and replies. Keep change control in its own chat. If another bot relays “Robert said yes”, that is not the same as you typing the approval where the script will run.

You can also put a recurring check on the calling bot, not on the PowerShell bot. A routine lives in that bot’s per-agent info pane, under the computer preview. Check the timezone under Settings, on the General tab, opened from the sidebar account button at the bottom-left, or with Cmd+,. Routines usually start within a few minutes either side of the time you set. If the run must start right on the minute, say “exactly” or “sharp”. The routine prompt can simply tell the monitor to ask the PowerShell bot for this week’s ORCA report.

5. A worked example: running ORCA

ORCA is a PowerShell module that compares your Exchange Online Protection and Microsoft Defender for Office 365 settings with Microsoft’s recommended Standard and Strict values. Microsoft documents it alongside the recommended threat policy settings: you install the module from the PowerShell Gallery, connect to Exchange Online, and run Get-ORCAReport. It produces an HTML assessment of anti-spam, anti-phishing, Safe Links, Safe Attachments and related controls.

You also need the Exchange Online Management module. To run ORCA, the official project says you need the Exchange Online View-Only Configuration role. In practice that means a read-only role such as Global Reader or View-Only Organization Management, which is exactly the access I already wanted the bot to have.

Microsoft also has a configuration analyzer in the Defender portal. That remains the better long-term check, because the current gallery release of the ORCA module, 2.8.1, was last updated in December 2023. For an MSP, the value of running it from a bot is speed and repeatability, not that it replaces the portal.

Once the PowerShell bot exists, the request is short:

Run https://github.com/cammurray/orca against [tenant] read-only. Use the Exchange certificate connection. Install the ORCA module if it isn’t already there, run Get-ORCAReport, summarise the findings in plain English, and give me the HTML report. Do not change anything in the tenant.

That is close to the prompt I actually used. The bot connected with the certificate, ran the module, and sent the report back. In one tenant it finished in about five minutes, and it only read the tenant. Of 67 checks, 50 were OK, 5 were informational and 12 were recommendations. In another tenant the pattern was similar: 50 OK, 4 informational and 13 recommendations. Typical findings were anti-phish actions left at NoAction, a low phishing threshold, Safe Links allowing click-through or missing coverage on some domains, and outbound spam limits that did not match the recommended values.

Two caveats are worth knowing if the bot’s computer is Linux, which mine is. The DKIM and SPF checks use Resolve-DnsName, which is a Windows cmdlet, so those checks may not run. In one run a Safety Tips check also failed with a server-side error, and a protection alerts check was skipped because it does not work over a certificate sign-in. None of that is a reason to avoid the report. It is a reason to read the gaps as well as the recommendations.

The point is the effort on my side. I did not install modules by hand, hunt for the right connect script, or click through a report wizard. I asked the bot I already had, and it used the repo and the certificate I had already set up.

Sample prompts

These are the prompts I would start with if you are setting up the same pattern.

Create the bot:

Set this bot’s name to PowerShell and set the description to: You are a specialist PowerShell tool for an Australian MSP. Other bots will ask you to run scripts and report back. Prefer scripts from https://github.com/directorcia/Office365, and pull the latest copy before you run one. Run scripts on your computer. Use certificate-based app-only sign-in for unattended Microsoft 365 work. Stay read-only unless I clearly ask for a change. Before anything that changes a tenant, tell me exactly what you will do and wait for approval in this chat. Report results in plain English, and say what you could not do.

Add the repo:

Add https://github.com/directorcia/Office365 to your list of script sources. When a job needs a script, check that repo first, pull the latest copy, and run it from there if it fits. Do not commit or push anything unless I ask.

The prompt another bot sends to call it:

Ask the PowerShell bot to run ORCA read-only against the tenant I name, using the Exchange certificate connection. Summarise the results in plain English and send back the HTML report. Change nothing in the tenant. If you hit a permission gap, say so and stop.

The ORCA run itself:

Run ORCA read-only against [tenant]. Connect with o365-connect-exo-cert-linux.ps1 using the saved profile and -Headless, then run Get-ORCAReport. Summarise the OK, informational and recommendation counts, list the important recommendations, and attach the HTML report. Tell me if any checks could not run, including DNS checks on Linux. Do not change anything in the tenant.

What I took from it

The useful design is not “give every bot PowerShell”. It is one specialist, a repo of scripts you already trust, and a sign-in that can run unattended without handing out a full administrator role.

Keep the human in charge of anything that changes a tenant, and keep that approval in the PowerShell bot’s own chat. Use official documentation when you check what a module is supposed to do – the Microsoft Learn connector is the straightforward way to pull that wording. And start with a real job, not a tour of features. For me, that job was ORCA. Once the bot was in place, running it was a short request, a few minutes of read-only work, and a report I could act on.

How Grok Bot Simplifies Security Checks and Investigations

A professional reviewing a laptop in a dim office, with teal and amber lighting

A Full Access grant on a mailbox is the kind of audit event that makes you sit up. Someone, or something, has just been given the right to open a mailbox and read what is in it. In an MSP or SMB tenant that is not a change you ignore. It is also, as I was reminded this week, the kind of change Microsoft’s own Exchange service can generate as routine maintenance. The hard part is telling those two things apart quickly, without handing extra privilege to the tool that is helping you look.

My read-only Microsoft 365 monitoring bot flagged a burst of mailbox changes at 6:02–6:03pm the previous evening, including a Full Access grant. It did not assume the worst, and it did not start changing anything in the tenant. It asked me a straight question: was that burst me, or a Copilot or agent test?

I had not made any mailbox changes. I told it to investigate further. What follows is how that investigation ran, what the issue turned out to be, and how you can set up a similar read-only check of your own.

Why audit noise is hard to work with

The Microsoft Purview unified audit log is one of the most useful tools in a Microsoft 365 tenant. It is also one of the noisiest. A genuine mailbox permission change sits in the same log as scheduled Microsoft maintenance, directory sync, and admin work you already know about. The record is often technically correct and still hard to read at a glance.

That problem is sharper for MSPs and smaller IT teams. An MSP is watching this pattern across many tenants, usually without a 24-hour security operations centre. An SMB often has one or two people who also run the rest of the environment. In both cases the failure modes are the same. You either spend the evening chasing a change that Microsoft already documented as normal, or you scroll past something that deserved a closer look.

Alerts do not solve this by themselves. An alert can tell you that a Full Access grant happened. It cannot tell you whether the actor was a person, an app you own, or Exchange doing maintenance. It also cannot tell you, in plain English, what was touched and what was not.

I already use Grok Bot for a morning brief of MSP news and security updates. That is a different job. Industry news will not investigate a change inside your tenant. For that, you need a bot with read-only access, a habit of asking you first, and a willingness to stop when it cannot see enough.

How Grok Bot helps

The value is not that the bot is cleverer than the audit log. The log already has the events. The value is the way the work is done:

  • It monitors in read-only mode, so a routine check cannot become a change in the tenant.
  • It asks the human first when something looks unusual, instead of guessing or firing a ticket.
  • It investigates on request, then reports findings in plain English.
  • It states gaps honestly. If it cannot confirm a permission is still in place, it says so, rather than quietly requesting more access for itself.
  • When more access is genuinely needed, the human grants it, after the bot has explained what it needs and what the trade-offs are.
  • It can pause for a safety check, including whether you are looking at the right tenant.

That last point matters more than it sounds. A useful investigation bot is sceptical, not eager.

A real investigation

The bot’s first message was the right one. It had seen a burst of mailbox changes at 6:02–6:03pm, including a Full Access grant, and it wanted to know whether that was me or a test.

Screenshot of a Grok Bot chat. The bot asks whether the 6:02–6:03pm mailbox change burst, including the FullAccess grant, was the author or a Copilot or agent test. The author replies that they made no mailbox changes and asks the bot to investigate further. The bot reports, read-only, that the changes were Exchange Online scheduled maintenance by the built-in NT SERVICE\MSExchangeAdminApiNetCore account on system mailboxes only, with a FullAccess grant to Discovery Management on the Discovery Search mailbox, and notes it could not yet confirm the grant is still in place.
My monitoring bot asked whether the mailbox change burst was me, then investigated read-only when I said it wasn’t.

I replied that I had made no mailbox changes the previous day, and asked it to investigate further.

It stayed read-only. The actor was not a user, and it was not one of my apps. It was Exchange’s built-in service account, NT SERVICE\MSExchangeAdminApiNetCore, running from inside Microsoft’s own servers. It had only touched Exchange’s built-in system mailboxes. No user mailbox was changed, and no forwarding was set.

The Full Access grant was also narrower than it first appeared. It gave the built-in Discovery Management role group access to the Discovery Search mailbox. That is Exchange’s eDiscovery role group, and Microsoft documents this permission as the default. The same pattern had already run about 20 times between 12 October and the day of the alert. It only looked suspicious because the audit record showed the account’s identifier rather than its name.

That reading matches Microsoft’s own documentation. In the audit log activities guidance, Microsoft says you may see NT SERVICE\MSExchangeAdminApiNetCore on mailbox permission events, that this is a system account in the Exchange service in the Microsoft cloud, and that a common audited activity is updating permissions on the Discovery Search mailbox to verify that Full Access — “which is the default” — is assigned to Discovery Management. If you want to check that kind of claim while you investigate, the Microsoft Learn connector in Grok Bot is the straightforward way to pull the official wording rather than relying on memory.

So the story in the audit log was already pointing to routine maintenance. There was still a gap.

Closing the last gap

The bot was honest about what it could not do. It could see the audit events, but the read-only app could not read current Exchange mailbox permissions, so it could not confirm the Full Access grant was still in place. It did not request extra permission for itself, and it did not grant itself any.

Instead, it explained the access it needed, and I granted it. That was the Exchange.ManageAsApp application permission, with admin consent, plus the Global Reader role.

This is where least privilege deserves a proper look. Exchange.ManageAsApp lets an app connect to Exchange Online PowerShell without a user sign-in, but it is not a blank cheque. Microsoft still requires an Entra role or an Exchange role group to decide what the app is allowed to do. Global Reader is a supported choice for that, and Microsoft describes it as the read-only counterpart to Global Administrator: it can read settings and administrative information across Microsoft 365 services, but it cannot take management actions.

It is still broader than this particular check required. In Exchange Online, Global Reader maps to the View-Only Organization Management role group, whose members can view the properties of any object in the organisation. If all you need is Exchange visibility, adding the app to View-Only Organization Management is the narrower path. Global Reader also grants read access across other Microsoft 365 admin centres. The bot pointed that alternative out. I chose Global Reader anyway, because I wanted the broader read-only view for this monitoring bot and I was the person granting it. The trade-off was explicit. That is the standard I want: the human decides, with the narrower option on the table.

There was one more useful pause. I sent a screenshot from the admin portal so the bot could see the consent and role grant. The header showed a name that made it stop and warn me I might be in the wrong tenant. It was actually this tenant’s display name. I would rather a bot hesitate over a familiar name than charge ahead in the wrong directory.

With the access in place, the bot connected app-only to Exchange Online PowerShell, ran only Get-* read cmdlets, and disconnected. It confirmed that Discovery Management still has Full Access on the Discovery Search mailbox. The permission is not inherited, and it is not a deny entry. That matches Microsoft’s documented default, and it was still in place after the maintenance. Nothing in the tenant was changed. The evidence was written to an investigation file with no secrets in it.

The outcome was straightforward: routine Exchange Online maintenance, no incident. It was all resolved the next morning, within minutes of the access being granted.

Example prompts

These are the kinds of prompts I would start with if you want the same behaviour.

Set the bot’s role:

You are a read-only Microsoft 365 security monitoring bot for an MSP. Watch the unified audit log for unusual mailbox permission changes, forwarding, and similar high-impact events. When you see something that looks unusual, ask me whether it was expected before you investigate. Stay read-only. If you hit a permission gap, tell me what you cannot see and what access would close that gap. Do not request or grant yourself extra permission.

Create a recurring check:

Create a routine called Mailbox permission watch. Every weekday at 8:15am Sydney time, search the unified audit log for mailbox permission changes since the last run, including Full Access grants and forwarding changes. If nothing material happened, tell me that in this chat and stop. If something looks unusual, summarise it in plain English and ask me whether it was expected before investigating further. Stay read-only.

When an alert appears:

I made no mailbox changes yesterday. Please investigate further. Stay read-only. Identify the actor, what was changed, whether any user mailbox was touched, and whether forwarding was set. If the actor looks like a Microsoft system account, check the official Microsoft documentation and tell me if this is a known maintenance pattern. If you cannot confirm the current permissions, say so clearly and do not try to expand your own access.

After you have granted extra read access:

I have granted the access we discussed. Connect app-only to Exchange Online PowerShell, run only Get-* cmdlets, confirm whether the permission is still in place, then disconnect. Record the findings in an investigation file with no secrets. Change nothing in the tenant.

How to set up a similar read-only check

You can do most of this in chat. The only app locations I will point you to are ones I have verified: the per-agent info pane, and Settings for timezone.

1. Give a bot a clear role

Use a dedicated bot for tenant monitoring, so investigation work is not mixed with unrelated chats. Click the agent’s name in the chat header, or use Cmd+Shift+I, to open the per-agent info pane. The gear beside the X opens the per-agent settings for avatar, name, title and description. Give it a clear description: read-only monitoring, ask first, investigate on request, state gaps honestly, never escalate its own permissions.

2. Start with read-only audit access

Give that bot read-only access to the unified audit log through an app you control. Start with enough access to search the log, and nothing more. The investigation above got a long way on audit events alone.

3. Save the behaviour in chat

Use the role prompt above. Be explicit that the bot must ask you before digging in, must stay read-only, and must not request or grant itself extra permission.

4. Add Microsoft Learn for official checks

Add the Microsoft Learn connector if you want official documentation checked during an investigation, rather than after the fact. I walked through that setup in How to Set Up MCP Connectors in Grok Bot with Microsoft Learn.

5. Create a routine

Create the routine in chat. You can review saved routines in the same per-agent info pane, under the computer preview. Check the timezone under Settings, on the General tab, opened from the sidebar account button at the bottom-left, or with Cmd+,. Routines usually start within a few minutes either side of the time you set. If the run must start right on the minute, say “exactly” or “sharp”.

6. Grant extra access yourself when a gap appears

For a current mailbox permission check, that means Exchange.ManageAsApp with admin consent, plus a view-only role. Prefer View-Only Organization Management if you only need Exchange visibility. Use Global Reader only if you have a reason for the broader Microsoft 365 read access, and make that choice deliberately.

7. Keep an investigation trail

A file of findings with no secrets in it is more useful the next time the same maintenance burst appears.

What I took from it

The first lesson is the oldest one in this kind of work: verify before you panic. A Full Access grant is worth taking seriously. In this case it was Microsoft putting a documented default back where it already belonged. The audit log looked worrying because it showed an identifier instead of a familiar name. That is not a reason to ignore the alert. It is a reason to investigate it properly.

The second is least privilege. The bot did not help itself to more access when it ran out of visibility. I granted the extra permission, and I accepted a broader role than the narrowest option on the table. I am comfortable with that choice. I would not have been comfortable if the tool had made it for me.

The third is to keep the human in charge. The useful pattern was simple. The bot watched, asked, investigated, admitted a gap, explained the access it needed, paused when a screenshot might have been the wrong tenant, ran only read commands, and wrote down what it found. I still made the calls that mattered.

That is what simplified the security check. Not a dashboard, and not a promise that every alert is harmless. I went from a worrying Full Access grant to a documented, no-incident conclusion the next morning, without the tool quietly expanding its own reach. For an MSP, that is the difference between an audit event that ruins the start of the day and one that has already been explained.