New Environment Created Alert
Scheduled poll via Power Platform for Admins V2 diffs against a Dataverse snapshot. On new environment detected, posts to a Teams admin channel and creates a Planner review task.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow performs scheduled governance over Power Platform tenant environments. On a recurring schedule it lists all environments via the Power Platform for Admins V2 connector, diffs that live list against a snapshot stored in a Dataverse baseline table, and — when a previously unseen environment is detected — posts a notification to a Teams admin channel and creates a Planner task so an admin can review and triage the new environment.
The newly detected environment is then written into the Dataverse snapshot so subsequent runs treat it as known. The flow ships in Stopped state for safe import; configure environment variables and connections, then turn it on.
Use Case
Power Platform tenants can sprawl quickly — makers self-serve trial and developer environments, and admins often have no proactive signal when a new environment appears. This flow gives IT admin teams a near-real-time alert when a brand-new environment is created in the tenant, plus a Planner task to track review, ownership confirmation, and governance follow-up. It pairs a Teams notification (high-visibility) with a Planner work item (durable, assignable) so nothing slips between the cracks.
The flow is ideal for teams that:
- IT Admins
- Power Platform Admins
- Center of Excellence (CoE) Teams
- Governance Teams
Flow Architecture
Recurrence
RecurrenceFires on a recurring schedule (e.g. every 4 hours) to poll the tenant for new Power Platform environments.
Initialize varTeamsGroupId
Initialize variableString variable hydrated from the `flowlibs_TeamsGroupId` environment variable — Microsoft 365 Group ID for the admin Teams team.
Initialize varTeamsChannelId
Initialize variableString variable hydrated from the `flowlibs_TeamsChannelId` environment variable — channel ID within the admin Teams team for posting new-environment alerts.
Initialize varPlannerPlanId
Initialize variableString variable hydrated from the `flowlibs_PlannerPlanId` environment variable — Planner plan ID where review tasks are created.
Initialize varPlannerBucketId
Initialize variableString variable hydrated from the `flowlibs_PlannerBucketId` environment variable — target bucket within the Planner plan for new-environment review tasks.
Initialize varBaselineEntityName
Initialize variableString variable hydrated from the `flowlibs_EnvBaselineEntity` environment variable — logical name of the Dataverse table storing the environment snapshot.
List_Environments
Power Platform for Admins V2 — List environmentsCalls the Power Platform for Admins V2 connector to enumerate all environments currently visible in the tenant.
Get_Baseline_Snapshot
Dataverse — List rowsReads the existing environment snapshot from the Dataverse baseline table (logical name from varBaselineEntityName).
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TeamsGroupId | String | <configure> | Microsoft 365 Group ID for the admin Teams team that receives new-environment alerts. |
| flowlibs_TeamsChannelId | String | <configure> | Channel ID within the admin Teams team where new-environment alerts are posted. |
| flowlibs_PlannerPlanId | String | <configure> | Planner plan ID where new-environment review tasks are created. |
| flowlibs_PlannerBucketId | String | <configure> | Bucket ID within the Planner plan where new-environment review tasks land. |
| flowlibs_EnvBaselineEntity | String | flowlibs_environmentbaseline | Logical name of the Dataverse table storing the environment snapshot (e.g. flowlibs_environmentbaseline). |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Power Platform for Admins V2 | shared_powerplatformforadminsv2 | ListEnvironments (enumerates all environments in the tenant) |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords (reads the environment snapshot baseline) CreateRecord (writes newly detected environments into the snapshot) |
| Microsoft Teams | shared_teams | PostMessageToChannelV3 (posts new-environment alerts to the admin channel) |
| Microsoft Planner | shared_planner | CreateTaskV3 (creates a review task for each new environment) |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Create the Dataverse baseline table
- Create a custom Dataverse table (e.g. flowlibs_environmentbaseline) with at minimum an EnvironmentId (primary) column and a DisplayName text column. The flow writes new environment IDs here and queries against it each run — without this table the ListRecords and CreateRecord actions will fail.
- Authorize the Power Platform for Admins V2 connection
- The Power Platform for Admins V2 connector requires a user account with Power Platform tenant admin (or appropriate environment admin) permissions to list all environments in the tenant.
- Point the Teams environment variables at your admin channel
- Update the flowlibs_TeamsGroupId and flowlibs_TeamsChannelId environment variables to your admin team's M365 Group ID and channel ID so alerts land in the right channel.
- Configure the Planner plan and bucket
- Set flowlibs_PlannerPlanId to the plan that should hold review tasks and flowlibs_PlannerBucketId to the bucket (e.g. New Environments or Triage) where those tasks should land.
- Adjust the recurrence cadence
- The Recurrence trigger ships at a default cadence (e.g. every 4 hours). Increase frequency for tighter detection latency or decrease it to reduce admin API calls — there is no event-based trigger for new environments today, so polling cadence directly drives detection delay.
- Seed the baseline before going live
- On the very first run every existing environment in the tenant will be treated as new. Either pre-populate the snapshot table with current environment IDs, or run the flow once with the Teams/Planner branches disabled to seed the baseline silently.
- Turn the flow on after configuration
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01New environment detection
Used in the Is_New_Environment condition — returns true when the Dataverse snapshot has no matching record for the current environment ID.
EXPR.02Environment variable binding
Runtime resolution of a solution-aware environment variable; the same pattern is used for all five flowlibs_* parameters.
EXPR.03Baseline entity dynamic name
The Dataverse ListRecords and CreateRecord actions read the entity logical name from this variable, so the snapshot table can be renamed without editing the flow.
EXPR.04Review task due date
Sets the Planner review task due date three days from the run time so admins have a clear SLA on triaging the new environment.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.