Hi @Calderara Serge , based on my tests, you may be trying to delete some accounts with special roles so this leads to privilege issues. In my tests, the same error occurred when I used client credentials flow to get authentication and then used the API to delete the account that was granted the role.
You can grant your app the global administrator role in AD.portal to solve the problem of privileges. Hope this can help, wish you all the best.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.