I'm trying to access my organisations directory list via a standard users account using the following endpoint https://www.googleapis.com/admin/directory/v1/users
with the viewType set to domain_public
, my organisation set and the https://www.googleapis.com/auth/admin.directory.user.readonly
scope.
However every time I try I just get
{
"error": {
"errors": [
{
"domain": "global",
"reason": "forbidden",
"message": "Not Authorized to access this resource/api"
}
],
"code": 403,
"message": "Not Authorized to access this resource/api"
}
}
I've checked with my GSuite admin and both the directory feature and contact sharing are turned on an it's been 24 hour since doing so and I'm doing this via the 'try this api' feautre so I know the token is good.
Are there any other settings my admin has to enable to get this working? I tried with a brand new GSuite account that I set up yesterday for another company and it seemed to just work out the box for them...