What you will learn
- Implement Role-Based Access Control (RBAC) to enforce the principle of least privilege.
- Configure the Auditor Skill to monitor for PII leaks and malicious behavior.
- Set up secure, server-to-server OAuth integration for Microsoft Dynamics 365 and SharePoint.
Role-Based Access Control (RBAC)
Securing AI agents at scale requires a multi-level access framework. In raia CX, permissions are divided into organization-level roles and agent-level roles. Role names are product-specific: raia Command uses its own organization roles.

Organization Roles
In Invite User In Organization, choose the role needed for the person's work. Org Owner is not an option in this invitation menu. Review the role before sending an invitation.
- Highlight 1: Org Admin, Org Manager or Org User
- Highlight 2: Copilot Admin or Copilot User
- Highlight 3: Guest
Org Owner
Full control of the organization — agents, users, settings and billing.
Org Admin
Manages agents and users in the organization, and can assign every role except Owner. When you invite someone in raia CX, you can choose Org Admin, Org Manager, Org User, Copilot Admin, Copilot User or Guest; see Roles & Permissions.
Agent Roles
Agent Owner
Full control over the agent, including delete.
Agent Admin
Everything except deleting the agent and granting Owner.
Agent Editor
Configure, train and run the agent, but not manage members or limits.
Agent User
Use the agent and view its Info, Launch and Report tabs. (Agent Copilot Admin and Copilot User roles cover the Copilot app only.)
Best Practice: Always apply the Principle of Least Privilege. If a user only needs to update training documents, assign them the Agent Editor role — not Agent Admin.
The Auditor Skill
The Auditor Skill supports configured monitoring and alerts. Verify which messages are evaluated and how failures are handled; alerts do not establish compliance or block every unsafe action.

01
PII Auditor
Scans for Personally Identifiable Information (emails, phone numbers, SSNs). The core safeguard against data leakage — enable this first.
02
Hack Auditor
Detects system abuse, prompt injection attempts, and malicious intent.
03
Custom Auditor
Enforces organization-specific policies (e.g., flag any mention of an unreleased product).
When an auditor triggers, the alert is logged in the Alerts tab and dispatched to the configured Recipient (e.g., a webhook sent to a SIEM tool, Slack channel, or email address).
Enterprise OAuth: Microsoft Integration
For deep integrations with enterprise systems like Microsoft Dynamics 365 or SharePoint, raia uses the Microsoft Entra ID OAuth 2.0 client credentials flow. This allows raia to authenticate securely as a server (S2S) without requiring an interactive user login.

The 4-Step Setup Flow
- Step 01
Register the App
Register raia as a Single-Tenant application in Microsoft Entra ID. Record the Client ID and Tenant ID.
- Step 02
Configure Credentials
Upload a certificate (recommended) or generate a Client Secret. Store it securely in Azure Key Vault.
- Step 03
Create the Application User
For Dynamics 365: create an Application User in Dataverse with a custom security role (never System Administrator). For SharePoint: grant the Sites.Selected permission in Microsoft Graph to scope access to specific site collections.
- Step 04
Authenticate
raia requests an access token from the Microsoft identity platform. The token is valid for 60 minutes and passed as a Bearer token in all API calls.
Security Note: Never assign the System Administrator role to the Application User. Scope permissions narrowly with custom security roles in Dataverse and Sites.Selected in SharePoint to enforce least privilege at the integration layer.
Frequently Asked Questions
Can I restrict agent access by IP address or domain?
Confirm the access restrictions available for your agent and channel, and test permitted and rejected access. Do not assume IP or domain settings establish user authorization.
If the PII Auditor flags a message, is the message blocked from being sent?
The Auditor Skill is primarily a monitoring and alerting tool. Depending on configuration and custom prompt rules, you can instruct the agent to refuse to answer when PII is detected, but the Auditor itself generates alerts for review.
Why use Sites.Selected for SharePoint instead of Files.ReadWrite.All?
As an application permission, Files.ReadWrite.All can reach files across the tenant. Sites.Selected limits the app to sites with an explicit grant, after admin consent and with a valid token for that scope; as a delegated permission it is further limited to what the signed-in user can access. It does not cancel other permissions the app has, so review the full grant set.
Path complete
Congratulations — you have completed the Agent Integration path. You now have the knowledge to deploy, connect, and secure raia agents within complex enterprise environments.