Contents

Error AF20023 while deploying Office 365 Management API

Contents

I know what you are thinking, another post about the Power Apps COECenter of Excellence, but I’ve recently deployed the COE starter kit and the YouTube channel is awesome with step by step guidance.

I ran into a tiny problem… while trying to get the Power Automate custom connector to connect to the Office 365 Management API, I kept on receiving a the following response from the server :

{
  "error": {
    "code": "AF20023",
    "message": "The subscription was disabled."
  }
}

I managed to resolve this problem by enabling the subscription.

TIP

You would need to do a POST request to https://manage.office.com/api/v1.0/{tenant}/activity/feed/subscriptions/start?contentType=Audit.General

be sure to change {tenant} to your tenant mornewolfaardt.onmicrosoft.com

If you use Postman there is a full Office 365 Management API template available (https://documenter.getpostman.com/view/8229827/SVmr1M6o) Postman Office 365 Management API Template Once installed, authenticate and create your POST Request. If all goes well you will receive a status: enabled response

{
    "contentType": "Audit.General",
    "status": "enabled",
    "webhook": null
}

Postman doing POST request request to Office 365 Management API Now in Power Automate test the operation of the Office 365 Management API again. The response status is now 200 successful. Power Automate returning successful after subscription is enabled

Leave me a comment
I would love to hear your comments, leave me some feedback below.