Chapter 8 · Identity, security and guardrails
Admin console (SCIM, Compliance API)
Staff sign in through SAML SSO with Entra ID, and SCIM creates accounts and removes them when people leave. Roles and groups control who uses Codex, apps or agents. The Compliance API delivers conversations and activity to your tools for audit, eDiscovery and DLP.
Security: Enterprise adds your own keys with Enterprise Key Management, IP allowlisting, custom retention periods and data residency, in the EU among other regions. We decide with your data protection officer which of these you need.
Where it runs: ChatGPT Enterprise admin console with SAML SSO, SCIM, RBAC, the Compliance API Logs Platform and the global admin console.
- Entra ID
- SCIM
- Compliance API
- Enterprise Key Management
Chapter 3 · AgentsIn both guides
Agent
A request arrives by email or from an event, and the agent plans the steps itself: it reads the request, pulls knowledge from approved sources, calls tools in your systems and presents the result. Model, instructions, knowledge, tools and memory together carry one task from start to finish. Before every step with consequences it waits for a person.
Security: Every agent signs in with an identity of its own and receives only the rights its task needs. Sending, booking and deleting go through an approval, and every step is logged.
Where it runs: At Microsoft as an agent in Copilot Studio or in Foundry Agent Service, at OpenAI as a workspace agent in ChatGPT, through the Agents SDK in your application or as an agent on the Agents API.
- Copilot Studio
- Microsoft Foundry
- Agents API
- Agents SDK
Chapter 3 · Agents
Agents API
The Agents API provides the managed runtime OpenAI itself uses for Codex: sessions that persist, sandboxes, context compaction and several agents working together. The sandbox is hosted by OpenAI, by you, or there is none. Since 29 September 2026 an agent can also operate a browser through it.
Security: The Agents API has been in public beta since 10 September 2026. For production workflows with personal data we choose it only once data processing and retention are settled.
Where it runs: OpenAI Agents API (public beta) with sessions, sandboxes, MCP and computer use in an OpenAI-hosted browser.
- Agents API
- Sandbox
- Computer Use
- MCP
Chapter 3 · Agents
Agents SDK
The SDK runs the loop of model call, tool call and handoff to further agents, and you decide on hosting, storage and approvals. Guardrails check inputs and outputs, and traces show every step. Since April 2026 the SDK includes a sandbox for work with files and tools, first in Python.
Security: Tools with consequences, such as reporting a deviation in the ERP, require approval by a person in the SDK. We run the agent in your environment, with your logs.
Where it runs: OpenAI Agents SDK for Python and TypeScript, hosted in Azure Container Apps for example.
Exampleapp/invoice_agent.py
agent = Agent(
name="Invoice check",
instructions=INSTRUCTIONS,
tools=[find_order, report_deviation],
output_type=CheckResult,
)
result = await Runner.run(agent, invoice_text)
- Agents SDK
- Guardrails
- Tracing
- Python
Chapter 3 · AgentsIn both guides
AGENTS.md
AGENTS.md, or CLAUDE.md for Claude Code, describes the structure, build and test commands, conventions and the areas no agent changes. Recurring routines such as a database migration sit alongside as skills and are loaded only when the task needs them. The team maintains these files like code, with pull request and review.
Security: Instruction files go through the same review as code, because a manipulated instruction steers every agent. For paths such as /infra, CODEOWNERS requires approval from the platform team.
Where it runs: AGENTS.md for Codex and GitHub Copilot, CLAUDE.md and skills for Claude Code, CODEOWNERS in GitHub or automatically included reviewers in Azure Repos.
ExampleAGENTS.md
# AGENTS.md
## Build and tests
- dotnet build ./src/ErpExport.sln
- dotnet test --filter Category!=Integration
## Rules
- Public API only with an entry in docs/api.md
- /src/Payroll and /infra stay unchanged
- Test data only from /tests/fixtures (fictional)
- AGENTS.md
- CLAUDE.md
- Skills
- CODEOWNERS
Chapter 9 · Rollout and operationsIn both guides
AI directive
At its centre is a table of the approved tools, their contracts and the highest level that may be entered there. Rules on when AI content is labelled come on top, for example when customers write to an agent. When a rule stops a prompt, the notice leads straight to the relevant passage of the policy.
Security: On managed devices a DLP rule warns when confidential content is pasted into AI websites and blocks it for personal data. Where a vendor processes the data, we record per tool and contract.
Where it runs: Policy on the intranet, enforced technically with Purview DLP for devices and browsers and the policy link in the notices.
Examplepolicy/ai-tools.txt
Tool highest level
Microsoft Copilot Confidential
ChatGPT Enterprise Internal
Claude (Team contract) Internal
Personal AI accounts Public
Labelling: agent in customer contact says so
Notice link: intranet/ai-policy#levels
- Endpoint DLP
- Microsoft Edge
- SharePoint
Chapter 6 · Data boundaries and data protection
API project
Per project you set keys with an expiry date, hard spend limits and the data region at creation. OpenAI does not use API data for training unless you explicitly opt in. Zero Data Retention or Modified Abuse Monitoring remove content from abuse monitoring logs once OpenAI approves.
Security: Data residency does not cover system data such as account data and usage metadata. We record per project where its models process data before confidential content flows.
Where it runs: OpenAI API Platform with projects, project keys, spend limits and data controls at organisation and project level.
Exampleopenai/projects/invoice-agent.yaml
project: invoice-agent-prod
region: Europe # at creation, fixed
data_retention: zero_data_retention
api_keys:
expires_at: set, rotated from the vault
spend_limit: hard, per project
- OpenAI API
- Zero Data Retention
- Data Residency
Chapter 8 · Identity, security and guardrailsIn both guides
Approval
Reading, sorting and preparing the agent may do as much as it likes. Sending, booking, committing and deleting it prepares and then waits until a person confirms in Teams, in Outlook or in your application. If the question reaches nobody, the answer is no, and the case is ready for review the next morning.
Security: Every approval and every refusal is logged with person and time. Actions that must never run without a human are not given to the agent as a tool in the first place.
Where it runs: Approvals in agent flows and the Teams Approvals app, mcp_approval_request and require_approval in Foundry Agent Service; at OpenAI the approval of a tool call in the Agents SDK and the Codex approval policy.
- Agent Flows
- Foundry Agent Service
- Agents SDK
- Microsoft Teams
Chapter 4 · Knowledge and data
Apps in ChatGPT
With apps ChatGPT reads documents from SharePoint and Outlook, issues from GitHub or data from your own systems. Company knowledge answers questions across several connected sources. Custom apps built on MCP come from developer mode, which is still in beta.
Security: The admin decides which apps are allowed in the workspace; Enterprise keeps them in a connector registry. In an app ChatGPT sees only what the signed-in person may open there.
Where it runs: Apps and company knowledge in ChatGPT Business and Enterprise, connector registry in Enterprise.
- ChatGPT Apps
- Company Knowledge
- MCP
- Connector Registry
Chapter 3 · Agents
Assistants API
Until 26 August 2026 developers built agents on the Assistants API with threads, files and tools; on that day OpenAI removed it. Existing integrations run on the Responses API, the Conversations API keeps the history, and whoever needs the agent loop takes the Agents SDK or the Agents API. The name lives on in search queries, articles and old repositories.
Security: A migration is the moment to decide data storage afresh: with store=False the Responses API keeps no retrievable state, and the data region applies per project.
Where it runs: Shut down on the OpenAI platform; the successors are the Responses API and the Conversations API, and for agents the Agents SDK and the Agents API.
- Assistants API
- Responses API
- Conversations API
- Agents SDK
Chapter 2 · ModelsIn both guides
Azure OpenAI
The same GPT models as at OpenAI run in your Azure subscription as a deployment in Microsoft Foundry: signed in with Entra ID, reachable through private endpoints, billed on the Azure invoice and logged in Purview. An existing Azure OpenAI resource becomes a Foundry resource; endpoint and keys stay.
Security: Prompts and completions stay in your resource and train no models; where they are processed is set by the deployment type.
Where it runs: Azure OpenAI in Microsoft Foundry, OpenAI models under Microsoft's terms; at OpenAI the same models directly through the API, with a data region per project.
- Azure OpenAI
- Microsoft Foundry
- Entra ID
- Microsoft Purview