Skip to content
OpenAdminOS

Examples gallery

Prompts that draft useful Microsoft 365 agents.

Copyable prompt examples for drafting read, write, and connector-backed OpenAdminOS agents for Microsoft 365 administration.

01 · Draft

The builder turns the prompt into a YAML Agent Template with Graph, transform, LLM, write, and connector steps.

02 · Validate

Schema, Graph endpoint, scope, LLM-step, connector, and write-confirmation checks run before save is enabled.

03 · Preflight

The app checks active tenant, provider, scopes, connector setup, and confirmation shape without applying writes.

04 · Install

The reviewed manifest is saved locally. Public sharing creates a reviewed GitHub issue, not an automatic Hub publish.

Builder flow

Describe the job. Review the manifest before it can run.

Build your own Agent starts with a natural-language description and drafts a YAML Agent Template. The app validates the draft, runs a local preflight against the active tenant and provider, then lets the admin install the reviewed agent.

These examples are phrased as prompts an admin could paste into that builder. The scopes shown are the permissions the resulting agent or connector would need before it can run.

No tenant changes

Read/investigate

These prompts draft read-only Agent Templates that pull bounded Microsoft Graph evidence, shape it locally, and ask the selected model to explain the finding.

Grounded in find-inactive-devices

Inactive device review

Read

Find Intune devices that have not synced in 60 days. Group them by operating system, compliance state, and ownership, and tell me what to check before cleanup.

The agent reads Intune managed devices, builds sync-age buckets, and returns a review-first cleanup report. It flags stale inventory as evidence to investigate, not proof that a device should be retired.

Graph scopes

  • DeviceManagementManagedDevices.Read.All

Read-only run. No Graph write step is generated.

Grounded in sign-in-failure-explainer

Failed sign-in clusters

Read

Explain failed Entra sign-ins from the last 24 hours. Cluster likely root causes by error code, app, Conditional Access status, client app, and affected users.

The agent reads recent failed sign-ins and groups them into likely root-cause clusters. The report separates known-noise patterns from failures that should move to CA review, device compliance checks, or incident response.

Graph scopes

  • AuditLog.Read.All

Requires Entra ID P1 data. It does not reset credentials or change policies.

Grounded in conditional-access-explainer

Conditional Access posture

Read

Review our Conditional Access policies for report-only controls, broad exclusions, stale policies, and gaps around admin MFA, legacy auth, guests, and risky sign-ins.

The agent reads Conditional Access policies and asks the model to produce a coverage map with named policies. It calls out disabled or report-only controls and states when coverage is not proven from the policy set.

Graph scopes

  • Policy.Read.All

Read-only policy review. Enforcement changes need a separate write agent.

Grounded in dormant-app-registrations

Dormant app registrations

Read

Find app registrations that look dormant or risky. Use age, sign-in audience, credentials, redirect URIs, app roles, required resource access, and missing publisher context. Do not recommend deletion without owner confirmation.

The agent reads app registrations and groups likely cleanup or review candidates. It is intentionally conservative because app registration data alone cannot prove an app is unused.

Graph scopes

  • Application.Read.All

Read-only report. Deletion is not proposed from this prompt.

Diff before change

Write with confirmation

Write prompts draft a read-and-plan pipeline first. The generated write step produces a bounded change set, then OpenAdminOS pauses for confirmation before any Graph mutation runs.

Grounded in stale-guest-cleanup

Disable stale guests

Write

Disable enabled guest accounts that have not signed in for 180 days, with my approval. Cap the plan at 50 users and explain each proposed disable.

The agent reads guest users, filters by stale sign-in activity, and asks the model for a per-guest rationale. The write plan patches accountEnabled to false only for the reviewed candidate list.

Graph scopes

  • User.Read.All
  • AuditLog.Read.All
  • User.ReadWrite.All

Typed confirmation pause: DISABLE N GUESTS before PATCH /users actions run.

Grounded in offboarding-agent

Retire stale Intune devices

Write

Retire corporate Intune devices that are stale in both Intune and Entra for 180 days, but only after I approve the diff. Exclude personal devices and explain the evidence.

The agent correlates Intune managedDevices with Entra devices, excludes personal and in-flight devices, and builds one retire action per candidate. The rationale includes sync age, Entra sign-in caveats, ownership, OS, and compliance signals.

Graph scopes

  • DeviceManagementManagedDevices.Read.All
  • Device.Read.All
  • DeviceManagementManagedDevices.PrivilegedOperations.All

Typed confirmation pause: OFFBOARD N DEVICES before Intune retire actions run.

Plausible new Agent Template

Move report-only CA policies

Write

Find Conditional Access policies that are report-only and start with Pilot -. Prepare a plan to enable them, but wait for my approval and show the before and after state for each policy.

The agent reads Conditional Access policies, filters to the named pilot set, and summarizes what enforcement would change. The write step uses a generic Graph PATCH plan against only the reviewed policy IDs.

Graph scopes

  • Policy.Read.All
  • Policy.ReadWrite.ConditionalAccess

Typed confirmation pause: ENABLE N CA POLICIES before policy state changes run.

Extends user-license-overview

Set missing usage location

Write

Set usageLocation to US for member users that are missing it, but only for accounts I review and approve. Skip guests and disabled accounts.

The agent reads users, selects member accounts with missing usageLocation, and explains why the field matters before license assignment. The write plan patches only the reviewed users and leaves guests or disabled accounts out.

Graph scopes

  • User.Read.All
  • User.ReadWrite.All

Typed confirmation pause: SET USAGE LOCATION FOR N USERS before PATCH /users actions run.

Read locally, send deliberately

Connector-backed delivery

These prompts keep Graph collection read-only, then use a declared connector or per-agent delivery rule to send the finished report. Connector egress is shown separately from Graph scope access.

Grounded in tenant-health-report

Weekly Teams compliance summary

Read + notify

Send a weekly compliance summary to my Teams channel. Include noncompliant and unknown counts, stale inventory, and the first action to take.

The agent reads Intune managed-device health, asks the model for a compact summary, and schedules the run. Delivery uses the Teams connector or delivery rule so the report lands in the selected channel.

Graph scopes

  • DeviceManagementManagedDevices.Read.All
  • Team.ReadBasic.All
  • Channel.ReadBasic.All
  • ChannelMessage.Send

Connector egress

Microsoft Teams · post-channel-message@1

Preview & send confirmation for the Teams post. The Graph work remains read-only.

Grounded in tenant-change-audit

Outlook tenant change digest

Read + notify

Email me a weekday digest of recent tenant changes: privileged role changes, app consents, failed admin actions, and anything off-hours. Keep it short.

The agent reads recent directory audit events, separates routine activity from changes worth checking, and renders a short digest. The Outlook connector sends the message through Microsoft Graph without reading mail.

Graph scopes

  • AuditLog.Read.All
  • Directory.Read.All
  • Mail.Send

Connector egress

Outlook · Mail.Send

Preview & send confirmation for the email. No Mail.Read scope is needed.

Extends risky-sign-in-triage

Risky user triage to Slack

Read + notify

Post high-priority risky user triage to the security Slack channel after I preview the message. Include only users classified as likely-compromise or unclear-needs-review.

The agent reads Entra risky users, classifies the freshest records, and filters the outbound summary to review-worthy users. Slack delivery is an external connector, so the page and app should say that the message leaves Microsoft 365.

Graph scopes

  • IdentityRiskyUser.Read.All

Connector egress

Slack · chat:write

Preview & send confirmation for Slack. External connector egress is disclosed.

Grounded in os-update-posture

WhatsApp update posture note

Read + notify

Send my on-call WhatsApp group a morning OS update posture note if stale Windows inventory increased. Mention stale sync caveats and avoid claiming a build is unsupported unless the data proves it.

The agent reads managed-device OS version and inventory freshness signals, then compares the scheduled result with the prior run. WhatsApp Web delivery sends only the final note through the locally linked session.

Graph scopes

  • DeviceManagementManagedDevices.Read.All

Connector egress

WhatsApp Web · send-message@1

Preview & send confirmation for WhatsApp. The connector does not read incoming messages.