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 Fundamentals #4: Understanding Power Fx in Power Apps: Core Functions, Formula Patterns, and Real-Time Business Scenarios: Quick Read Series

1. Business Scenario In modern enterprise applications, business logic is deeply embedded across user interfaces and data processes. This incl...

9 hours ago

Microsoft 365 & Power Platform Call (Microsoft Speakers) – March 31st, 2026 – Screenshot Summary

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

10 hours ago

Power Platform – Move apps out of the default environment

We are announcing the ability to move apps out of the default environment in Power Platform. This feature will reach general availability on A...

17 hours ago

How Power Platform Pay-as-you-go plan works

Pay-as-you-go plan is evolving for a while and with the recent changes around per App licensing I was force to learn about it. Pay-as-you-go i...

1 day ago

Power Platform admin center – Upcoming update to the enforcement of tenant isolation

Following customer feedback and support ticket evaluation, we have updated our tenant isolation enforcement policy. Starting March 30, 2026, o...

4 days ago

Microsoft 365 & Power Platform Community Call – March 26th, 2026 – Screenshot Summary

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

5 days ago

Microsoft 365 & Power Platform Call (Microsoft Speakers) – March 24th, 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 admin center – New alert metrics available in the Monitor section

We are announcing new metrics available for alerts in the Monitor section of the Power Platform admin center. This feature is available in pub...

7 days ago

Dynamics 365, Power Platform, and Role-based Copilot offerings 2026 release wave 1 plans available now

On March 18, 2026, we published the 2026 release wave 1 plans for Dynamics 365, Microsoft Power Platform, and Role-based Copilot offerings whi...

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