When a user who created a Copilot Studio agent leaves your organization, the agent becomes orphaned. No other administrator can edit, update, or manage that agent. This happens because Copilot Studio ties ownership to a single user account by default. Once that account is disabled or deleted, the agent loses its owner and becomes locked. This article explains the root cause of this lockout and provides a step-by-step fix to reassign ownership using the Microsoft 365 admin center and Power Platform admin center.
Key Takeaways: Regaining Access to Orphaned Copilot Studio Agents
- Power Platform admin center > Environments > [Environment] > Resources > Copilot Studio agents: Lists all agents in the environment and shows the current owner.
- Microsoft Entra admin center > Users > Deleted users: Restore the departed user account temporarily to regain agent edit access.
- PowerShell cmdlet Set-AdminCopilotOwner: Reassigns agent ownership to an active global admin or environment admin account.
Why Copilot Studio Agents Become Uneditable After the Owner Leaves
Copilot Studio stores agent ownership at the Microsoft Dataverse level. When a user creates an agent, the system records that user’s Microsoft Entra ID object ID as the owner. If the user is deleted from Microsoft Entra ID, the owner reference points to a nonexistent account. The Copilot Studio interface then blocks any edit operation because it cannot verify the owner’s permissions. This design prevents unauthorized changes but also locks out legitimate administrators.
The lockout occurs in two scenarios. First, if the user is deleted from Microsoft Entra ID permanently. Second, if the user is disabled but not deleted, the agent remains editable only by that user. No other admin can take over ownership without the original account being active. The fix requires temporarily restoring the deleted user, reassigning the agent, and then removing the user again.
Steps to Reassign Ownership of an Orphaned Copilot Studio Agent
Follow these steps in order. You need global admin privileges in Microsoft 365 and environment admin privileges in Power Platform.
Step 1: Restore the Deleted User in Microsoft Entra ID
- Open the Microsoft Entra admin center
Go to https://entra.microsoft.com and sign in with a global admin account. - Navigate to deleted users
Select Identity > Users > Deleted users. A list of users deleted in the last 30 days appears. - Locate the departed user
Find the user who created the Copilot Studio agent. Use the search box to filter by name or UPN. - Restore the user
Select the user, then click Restore user. Confirm the dialog. The user is restored to the active users list with their original object ID intact.
Step 2: Reassign the Copilot Studio Agent Ownership
- Open the Power Platform admin center
Go to https://admin.powerplatform.microsoft.com and sign in with the same global admin account. - Select the environment
Click Environments in the left navigation. Find the environment that contains the orphaned agent and click its name. - Access Copilot Studio agents
In the environment details, select Resources > Copilot Studio agents. A list of agents in that environment appears. - Identify the orphaned agent
Look for the agent that shows the restored user as the owner. The agent name usually matches the one you cannot edit. - Change the owner
Select the agent, then click Manage > Change owner. In the dialog, enter the name or email of a global admin or environment admin who will become the new owner. Click Change.
Step 3: Verify the New Owner Can Edit the Agent
- Sign in as the new owner
Open https://copilotstudio.microsoft.com and sign in with the account you assigned as the new owner. - Open the agent
In Copilot Studio, go to Agents and select the agent you just reassigned. You should now be able to edit topics, triggers, and settings. - Test a change
Make a minor edit, such as changing a response message. Click Save and Publish. If no errors appear, the reassignment succeeded.
Step 4: Remove the Restored User Again
- Delete the restored user
Return to Microsoft Entra admin center > Identity > Users > All users. Find the restored user, select them, and click Delete user. Confirm the deletion. - Wait for propagation
Allow up to 30 minutes for the deletion to propagate across Microsoft 365 services. The agent ownership remains with the new owner you assigned.
If the Agent Still Shows the Old Owner or Cannot Be Edited
Copilot Studio Agent Still Shows the Departed User as Owner
If the owner field in Copilot Studio still displays the original user after reassignment, the change may not have propagated. Clear your browser cache or sign out and sign back in. If the issue persists, use PowerShell to force the ownership change. Run the following cmdlet in the Power Platform admin PowerShell module:
Set-AdminCopilotOwner -EnvironmentId "your-environment-id" -AgentId "your-agent-id" -NewOwnerId "new-owner-object-id"
Replace the placeholders with the actual environment ID, agent ID, and the object ID of the new owner. You can get the environment ID from the Power Platform admin center URL. The agent ID is visible in the agent details page.
Cannot Access the Environment in Power Platform Admin Center
If you cannot see the environment that contains the agent, you lack environment admin privileges. Ask another global admin to add your account as an environment admin. Go to Power Platform admin center > Environments > select the environment > Access > Add people. Assign the Environment Admin role to your account.
Deleted User Exceeds the 30-Day Restore Window
Microsoft Entra ID retains deleted users for 30 days. If the user was deleted more than 30 days ago, you cannot restore them. In this case, contact Microsoft Support and request a Dataverse ownership override. Provide the environment ID and agent ID. Microsoft Support can reassign ownership at the database level. This process may take 24 to 48 hours.
Manual Ownership Reassignment vs PowerShell Reassignment: Key Differences
| Item | Manual Reassignment (Admin Center) | PowerShell Reassignment |
|---|---|---|
| Access required | Global admin + environment admin | Global admin + Power Platform admin PowerShell module |
| Steps | Restore user, change owner in UI, delete user | Run one cmdlet with environment ID, agent ID, and new owner ID |
| Time to complete | 15 to 30 minutes | 5 to 10 minutes |
| Requires user restore | Yes, always | Yes, always |
| Error handling | UI shows error messages | PowerShell returns error codes and logs |
Both methods require the original user to be restored first. The PowerShell method is faster and more reliable for environments with many agents. Manual reassignment is easier for administrators who prefer a graphical interface.
You can now reassign ownership of any orphaned Copilot Studio agent after a user leaves. The key steps are restoring the deleted user in Microsoft Entra ID, changing the owner in Power Platform admin center, and removing the restored user again. To avoid this problem in the future, create a shared service account with a license and assign it as the owner of all critical agents. This account should have a long-term license and never be deleted.