Loading...

{How to} Reassign an copilot agent's owner with Power Platform API

{How to} Reassign an copilot agent's owner with Power Platform API
Hello Everyone,



Today I am going to share my thoughts on how to reassign an copilot agent's owner with the Power Platform API.





Let's get started.


Here are the simple steps to reassign a Copilot Agent Owner using the Power Platform API.

This uses Microsoft Copilot Studio agents stored in Microsoft Dataverse.


Shorter version:

  • Get API token

  • Get botid

  • Get systemuserid of new owner

  • Send PATCH request to update ownerid




Step 1: Get the Environment URL

Find your Power Platform Environment URL.


Example:

https://yourenvironment.crm.dynamics.com



Step 2: Get an Access Token

Authenticate using Microsoft Entra ID.

You must obtain a Bearer token to call the Power Platform API.

Scope:

https://yourenvironment.crm.dynamics.com/default


Step 3:  Get the Copilot Agent ID

Call the API to list agents.

Get https://yourenvironment.crm.dynamics.com/api/data/v9.2/bots


Response example:

JSON

{
 "botid": "11111111-2222-3333-4444-555555555555",
 "name": "CustomerSupportCopilot"
}

Copy the botid.



Step 4: Get the New Owner User ID

Retrieve the user you want to assign.

GET https://yourenvironment.crm.dynamics.com/api/data/v9.2/systemusers

Find the systemuserid of the new owner.


Step 5: Reassign the Copilot Agent

Send a PATCH request to update the owner.

PATCH https://yourenvironment.crm.dynamics.com/api/data/v9.2/bots(BOT_ID)



Body:

JSON

{
 "[email protected]": "/systemusers(NEW_USER_ID)"
}


Example:  

JSON
{
 "[email protected]": "/systemusers(99999999-8888-7777-6666-555555555555)"
}





Result:

The Copilot agent is now owned by the new user.



That's it for today.

Until next blog post
Happy Copiloting 

aka @uk365guy.






Published on:

Learn more
MICROSOFT DYNAMICS CRM /365  BLOG
MICROSOFT DYNAMICS CRM /365 BLOG

This blog is all about MS DYNAMICS CRM DEVELOPMENT, C# .NET,SQL SERVER

Share post:

Related posts

Power Platform CoE Starter Kit is Retiring

Power Platform CoE Starter Kit is Retiring Everything You Need to Know About the Transition to Native Admin Center Governance 📅 Announced: Ma...

1 day ago

Microsoft 365 & Power Platform Community Call – May 7th, 2026 – Screenshot Summary

Call Highlights   SharePoint Quicklinks: Primary PnP Website: https://aka.ms/m365pnp Documentation & Guidance SharePoint Dev Videos Issues...

5 days ago

How to Mask Dataverse Field values in Microsoft Power Platform using Masking Rules

Introduction In modern business applications, protecting sensitive data is no longer optional. Organizations using Microsoft Dataverse often s...

5 days ago

Power Platform and Tenant Level Analytics

Today I’m looking at the Tenant Level Analytics setting. The Power Platform Admin Center is getting more and more features that we would...

6 days ago

Microsoft 365 & Power Platform Call (Microsoft Speakers) – May 5th, 2026 – Screenshot Summary

Call Highlights   SharePoint Quicklinks: Primary PnP Website: https://aka.ms/m365pnp Documentation & Guidance SharePoint Dev Videos Issues...

7 days ago

Power Platform – Backup retention of Production environments is changing from 28 to 7 days

Starting May 11, 2026, the default backup retention for Power Platform environments will be changed from 28 days to 7. All environments will c...

8 days ago

🚀 Power Platform Solution Architect Roadmap (with Modern AI Skills)

The role of a Power Platform Solution Architect is rapidly evolving. It’s no longer just about building apps—it’s about designing intelligent,...

8 days ago

Power Platform – Enable Managed Environment to extend storage retention period

As of April 30, 2026, the default system backup retention period for Power Platform environments is 7 days. How does this affect me? System ba...

10 days ago

Invisible Power Platform Connection References

On a Power Platform with multiple developers Connections and Connection references can be tricky. You have some connection references added to...

11 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy