Getting unauthorized when attempting to get api_base_url from ECE

I am attempting to retrieve the api base url from an ECE environment. When I issue the following command:
curl -s -k -XGET https://XXX.YYY.ZZZ:12443/api/v1/platform/configuration/api_base_url -H "Authorization: Bearer XXXX"

I get the following response:
{
"errors": [
{
"message": "The supplied authentication is not authorized to access this resource. Reason: [Missing required permissions].",
"code": "root.unauthorized.rbac"
}
]
}

As another point of information. The Bearer token returns data as expected when I run this command:
curl -s -k -XGET https://XXX.YYY.ZZZ:12443/api/v1/platform -H "Authorization: Bearer XXXX"

It returns:
{
"phone_home_enabled": true,
"eula_accepted": true,
"services": [
{
"type": "admin-console",
"image": [
{
"id": "xxx.yyy.zzz.aaa",
"version": "2.4.2",
"hash": "sha256:44f5f6c597475315a9b43456912dfadd6c8d3e44d12927b9158a6cd41640fbb5",
"tag": "docker.elastic.co/cloud-enterprise/elastic-cloud-enterprise:2.4.2"
}
]
}
],
"version": "2.4.2"
}

Any help would be appreciated. Note the Bearer token belongs to the admin user which was created when I installed ECE.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.