web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Looking for a Web API solution to disable a business unit.

(0) ShareShare
ReportReport
Posted on by 10

I'm looking for a way to use the Web API to disable a business unit and ultimately delete it if possible. I'm aware of the SetStateRequest in the SDK but was hoping for an equivalent Web API action/function. I can't seem to find anything helpful anywhere so hoping someone can help out. I'm suspecting it's not yet possible.

Thanks in advance!

I have the same question (0)
  • Verified answer
    Wahaj Rashid Profile Picture
    11,321 on at
    RE: Looking for a Web API solution to disable a business unit.

    Hi,

    Thank you for your query.

    You can simply update the isdisabled field to true of the Business Unit entity (there is no separate function available to set state in Web API).

    Here is example request:

    PATCH [Organization URI]/api/data/v9.0/businessunits(00000000-0000-0000-0000-000000000001)?$select=name,isdisabled HTTP/1.1  
    OData-MaxVersion: 4.0  
    OData-Version: 4.0  
    Accept: application/json  
    Content-Type: application/json; charset=utf-8  
    Prefer: return=representation  
      
    {"isdisabled":true}

    You can also use delete (using DELETE) verb to remove the BU:

    https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/update-delete-entities-using-web-api#basic-delete

    DELETE [Organization URI]/api/data/v9.0/businessunits(00000000-0000-0000-0000-000000000001) HTTP/1.1  
    Content-Type: application/json  
    OData-MaxVersion: 4.0  
    OData-Version: 4.0

  • Anrini Profile Picture
    on at
    RE: Looking for a Web API solution to disable a business unit.

    Thanks for the share

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
#ManoVerse Profile Picture

#ManoVerse 101

#2
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans