
Introduction: AI Agents Are Becoming Operational Identities
AI agents are moving from answering questions to performing work. In a Power Platform environment, an agent may retrieve Dataverse records, invoke a flow, call a connector, update a business record, or coordinate work across systems.
As soon as an agent can act, its access becomes a security and governance concern—not just a prompt-design concern.
The central questions are:
- Whose authority does the agent use?
- Which resources can it access?
- Which actions can it perform?
- How can its actions be reviewed and audited?
If these boundaries are unclear, an agent could unintentionally expose data, perform an excessive update, or execute an action outside its intended business purpose.
This article explores a practical security model for AI agents built with Power Platform components, covering identity, authentication, permissions, Dataverse security, environment controls, and operational governance.
Why AI Agent Security Is Different
Traditional applications generally follow predefined code paths and established service identities. AI agents can interpret instructions, select tools, and choose among multiple action paths.
This flexibility creates additional security considerations, including:
- Excessive permissions inherited from a maker or service account.
- Prompt injection attempts that redirect an agent.
- Unintended disclosure through retrieved content.
- Unauthorized business record changes.
- Weak approval controls.
- Insecure connector configuration.
- Untracked agent ownership.
- Insufficient audit trails.
An agent should not be treated as a trusted employee simply because it was created inside an enterprise tenant. It is a workload that requires explicit identity, scope, authorization, monitoring, and lifecycle management.
Build a Layered Security Model
A secure AI agent requires multiple security controls working together.
Identity
Establish a clear identity for each agent or workload. Microsoft Entra ID authenticates users and workloads across Microsoft services.
Microsoft also documents Entra Agent ID capabilities for agent identities and Copilot Studio integration. The Entra agent user feature referenced in the source is marked as preview, so verify its current availability and production suitability before relying on it.
Authentication and Connection Ownership
Document whether each connector runs using:
- The invoking user's connection.
- An owner or service connection.
- Another supported identity model.
Avoid broad shared credentials. Store secrets in approved secret-management services and define rotation and revocation procedures.
Authorization
Apply the principle of least privilege at every layer.
In Dataverse, security roles control access to tables and records. Assign only the privileges required for the agent's business purpose.
Additional controls include:
- Environment roles.
- App sharing.
- Connector policies.
- Data loss prevention (DLP) policies.
These controls provide different security boundaries and should not be assumed to replace one another.
Data Access
Classify the data an agent can retrieve, create, or update.
Limit access to the tables, columns, records, and environments required for the intended use case. Validate row-level and business-unit access using real user and agent scenarios.
Action Governance
Separate read-only actions from write or irreversible actions.
Require confirmation or human approval for sensitive updates, external communications, financial operations, deletion, and high-impact decisions.
Where appropriate, implement idempotency, duplicate prevention, and rollback or compensation patterns.
Monitoring and Audit
Capture relevant operational details, including:
- Agent identity and user context where available.
- Tool and action names.
- Target records.
- Decision and approval outcomes.
- Timestamps and correlation IDs.
- Failure details.
Protect logs from unauthorized access and establish appropriate retention policies.
Dataverse Security and MCP Considerations
Dataverse uses role-based security. Security roles combine privileges and access levels to control which records users can view and how they can interact with them.
An agent using Dataverse should be tested against the actual role and record-level boundaries that apply to its execution identity.
The Dataverse Model Context Protocol (MCP) server enables compatible clients to interact with Dataverse through a standardized tool interface.
Microsoft documentation states that Dataverse security roles and row-level security continue to apply to MCP access.
Administrators should also control:
- Which clients are allowed to connect.
- Which environments expose the MCP server.
- Which tools and data are available to each identity.
- How user and agent identities are configured.
Enabling an MCP endpoint does not grant blanket authorization. Endpoint configuration, client allow-listing, environment policies, Dataverse roles, and identity settings must be considered together.
A Secure AI Agent Lifecycle
Security should be addressed throughout the agent lifecycle, not only during initial development.
A practical lifecycle includes:
- Register and classify: Maintain an inventory of agents, business owners, technical owners, purpose, environment, data categories, connected systems, and risk tier.
- Define the identity: Determine whether the agent uses a user context, dedicated workload identity, or another supported model. Avoid relying on a maker's personal credentials for production.
- Design permissions: Map every tool to the minimum required table, record, and operation permissions. Separate read, create, update, delete, share, and administrative capabilities.
- Configure boundaries: Use environment separation, app sharing, DLP policies, connector controls, and approved network or service configurations.
- Protect high-impact actions: Introduce human approval, explicit confirmation, business rule checks, and transaction safeguards where required.
- Test adversarial and negative scenarios: Attempt unauthorized record access, cross-user data retrieval, prompt injection, unexpected tool selection, repeated requests, malformed parameters, and revoked credentials.
- Release and monitor: Use controlled deployment, change review, audit logging, periodic access reviews, and an emergency disablement process.
Threat Modelling and Test Scenarios
Before allowing an agent to interact with business systems, test how it behaves under unexpected or unauthorized conditions.
Important scenarios include:
- Identity substitution: Verify that an agent cannot silently execute with a more privileged maker identity than intended.
- Privilege boundary: Confirm that a user with read-only access cannot cause the agent to update a restricted Dataverse record.
- Record isolation: Verify that one business unit or user cannot retrieve records outside its permitted scope.
- Prompt injection: Place hostile instructions in retrieved content and confirm that the agent treats that content as untrusted data rather than policy or authorization.
- Tool abuse: Attempt to invoke tools outside the agent's declared purpose or provide unexpected parameters to a write operation.
- Approval bypass: Confirm that a high-impact action cannot proceed when approval is missing, expired, or denied.
- Credential revocation: Revoke a connector or agent credential and verify that subsequent operations fail safely.
- Replay and duplication: Resend an action request and verify that duplicate controls prevent unintended repeated updates.
These tests help identify weaknesses before an agent is allowed to perform business-critical operations.
Operational Governance: Who Owns the Agent?
Every production agent should have a named business owner and technical owner.
The business owner approves the agent's purpose, data use, and action boundaries. The technical owner manages configuration, deployment, monitoring, and incident response. Security and platform administrators define tenant and environment guardrails.
Organizations should establish periodic reviews covering:
- Agent inventory and ownership.
- Permissions and connected accounts.
- Tool definitions and data sources.
- Activity logs and model changes.
- Business outcomes and operational risks.
Agents that are no longer needed should be retired and their access removed. Changes to prompts or tools should be treated as controlled application changes when they can alter access or action behavior.
An incident playbook should also define how to disable an agent, revoke credentials, stop flows, identify affected records, preserve logs, notify stakeholders, and recover safely.
Key Takeaways
- Treat every production AI agent as a governed workload with an accountable owner and explicit purpose.
- Use least-privilege identity, Dataverse roles, environment controls, and connector policies together.
- Separate read access from write actions and require approval for high-impact operations.
- Test prompt injection, unauthorized access, approval bypass, credential revocation, and auditability.
- Review agent permissions, connections, and ownership throughout the lifecycle.
What We Learned
Securing an AI agent requires more than configuring a single permission or restricting its prompt.
The agent's identity, authentication method, connector ownership, Dataverse privileges, and available tools all influence what it can access and do.
For practical enterprise adoption:
- Start by identifying the business purpose and risk level of each agent.
- Map every connected tool to its required permissions.
- Test actual execution identities instead of assuming permissions are inherited as expected.
- Keep sensitive and irreversible actions behind appropriate approval controls.
- Monitor agent activity and periodically review access.
- Prepare an incident response process before production deployment.
The goal is to give agents enough access to complete approved tasks without allowing unnecessary privileges or uncontrolled actions.
Next Steps: Build Secure and Governed AI Agents With Softree
AI agents can support enterprise productivity when connected to the right systems with appropriate permissions and oversight.
Softree Technology helps organizations design, integrate, and govern Microsoft Power Platform, enterprise AI, and data-driven applications.
From defining agent identity and access boundaries to integrating Dataverse, configuring workflows, and establishing governance practices, Softree can help organizations build AI agents with security and accountability in mind.
Explore how Softree Technology can help your organization strengthen its Power Platform and enterprise AI architecture.



