Goal:
Our customer would like to create a service user that can utilize the User Management API to list all users:
The reason for creating a service user is to avoid the need to recreate the associated OAuth client when an authorized user leaves the organization and their Dynatrace account is deleted.
To prevent this, they would prefer to use a service user that is not tied to a specific individual.
Problem:
The required scope for the API, account-idm-read, is not listed as a policy statement.
However, when attempting to create a service user, it is necessary to define a policy.
Question:
Could you please confirm whether it is possible to create a policy that allows the account-idm-read scope?
If not, are there any plans to support this in future updates?
The user executing this needs to have a policy for handling service users:
ALLOW iam:service-users:use;
OR IF YOU WANT TO BE MORE SPECIFIC
ALLOW iam:service-users:use WHERE iam:service-user-email = "service-user-email@email.com";
For users you need to invoke curl -X ‘GET’ \ ‘https://{YOUR TENANT ID}.apps.dynatrace.com/platform/iam/v1/organizational-levels/environment/{YOUR TENANT ID}/users?pageSize=1000’ \ -H ‘accept: application/json’ \ -H 'Authorization: Bearer {YOUR PLATFORM TOKEN} but the only problem here is you cannot assign scope iam:users:read in Platform tokens.
I leave you this product idea to be able to add this scope to Platform Tokens.
Apologies for the delayed response.
I needed some time to fully understand the new functionality and its implications.
And thank you very much for posting the product idea, @DanielS.
I now understand that our goal is more appropriately achieved using Platform Tokens rather than an OAuth Client — I’m glad to have that clarified.
I’ll share this product idea with my colleagues and the customer.
It would be greatly appreciated if this feature could be considered for implementation!