Troubleshooting Unauthorized Error for `createPost` Method in DataHub

Original Slack Thread

Hello folks! I’m trying to test the createPost method but I’m getting an unauthorized error even while using the datahub root user. Any ideas?

Thanks (=

  "errors": [
    {
      "message": "Unauthorized to create posts. Please contact your DataHub administrator if this needs corrective action.",
      "locations": [
        {
          "line": 302,
          "column": 3
        }
      ],
      "path": [
        "createPost"
      ],
      "extensions": {
        "code": 403,
        "type": "UNAUTHORIZED",
        "classification": "DataFetchingException"
      }
    }
  ],
  "data": {
    "createPost": null
  },
  "extensions": {}
}```

Hi - could you confirm you have create global announcement privilege in platform policies? Root user doesn’t have this privilege as default.

Uploaded by Hyejin Yoon (Acryl)

Hey! Thanks for answering (=

Indeed that wasn’t setup. But I quickly created a policy to try it out and it’s still not working, receiving the same error

While trying to make it work I added the Datahub user to the Admin role (Not sure if that is overwriting its permissions somehow). Couldn’t find how to remove it from role now :thinking_face:

Nevermind! Seems to have been some kind of cache. Tested it again today and it’s actually working after setting up that permission!

Thanks a lot for your support :purple_heart: