cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Authentication while calling IAM API using the app function

MartinMarko
Observer

I need to call IAM API secured by OAuth from my custom app

${environmentUrl}/platform/iam/v1/organizational-levels/environment/${environmentId}/users

I cannot find the react dynatrace-sdk library for that API.

When I call that API from app page/component, the expected result is returned. The issue is that I need to write a lot of boilerplate code for handling such call manually.

Recommended way to call APIs are app functions. In such case, useAppFunction provides that boilerplate code out of box.
The problem is that authentication is not used while calling that API from app function (got 401: Authentication required).

Is there any way to pass the bearer token from the application to the app function via payload when using useAppFunction?

Are there any other recommended methods to call "internal" APIs secured by OAuth and for which dynatrace-sdk library does not exist? Or is there a way to reuse dynatrace-sdk boilerplate code for that?

1 REPLY 1

Julius_Loman
DynaMight Legend
DynaMight Legend

@PennyScully any recommendations how to call such platform APIs?

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts