05 Mar 2025
11:18 PM
- last edited on
06 Mar 2025
08:58 AM
by
MaciejNeumann
I am trying to integrate Dynatrace Dashboards into my custom application (Angular frontend, NestJS backend). Right now, I have a dropdown with hardcoded Dynatrace dashboard links, but when users click them, they are required to log in manually. SSO is enabled in our log
My Requirement:
I want to enable automatic authentication so that when a user logs into my app, they can directly access the Dynatrace dashboards as I will be using a service account. Ideally, I will be using a service account and want to authenticate users before they click on my dynatrace dashboard link. Basically I want to authenticate them with my account because not every user will have access to the dashborad but the service account we create will have and would use that account.
My question is does Dynatrace allow authentication using an API or programmatically sign in once, so dynatrace dashboard when it opens, it opens in a new window using the authenticated session.
What I Tried:
As suggested in one of the community post here, I tried manual login via POST which does not work as I have Dynatrace SaaS (Solved: Re: Automatic login on dynatrace web dashboard - Dynatrace Community)
Manual login via POST form submission (Didn’t work)
I attempted to submit credentials via an HTML form, but it resulted in a 405 Method Not Allowed error.
After researching, I learned that Dynatrace SaaS does not allow direct login via POST requests.
Embedding a dashboard in an iframe also does not work and is not supported by dynatrace.
Selenium-based automation (Not an option)
I found in this post - Solved: Re: Automatic login on dynatrace web dashboard - Dynatrace Community that used Selenium to auto-login. However, I cannot use Selenium because my backend is deployed on OpenShift, and running a browser on the server is not possible.
My Questions:
1) Does Dynatrace provide an API for SSO login or automatic authentication?
2) Can I authenticate via an API and generate a session token to append to dashboard URLs?
3) Can a service account be used to persist a session across users?
4) If I obtain a service account, is there a way to use its credentials so that users clicking the dashboard links are authenticated automatically ?
5) Are there alternative ways to authenticate users before redirecting them to a dashboard?
6) If I store an authentication cookie or token, will Dynatrace allow session persistence across different users?
FYI, I am aware I can fetch data from the dynatrace api for the dashboards intergration and I have also tried that. But due to our dynatrace dashboards being complex with alot of data, we have decided to use a service account and now I am trying to authenticate user with that service account and redirect them to the dashboards linked in my app.
Would really appreciate any guidance or solutions that others have used and sorry if the information is too much to read.
Thanks in advance.
Solved! Go to Solution.
06 Mar 2025 05:57 PM
It's my understanding that the authentication and access controls that Dynatrace has implemented are intended to specifically exclude the possibility of persisting a single session across multiple browsers or users, as this would compromise security in a myriad of ways.
That said, did you say that you use an identity provider (IDP) for SSO? If so, you might be able to construct a deep-link that gets users into the dashboard via the IDP without the need to physically enter credentials. Something like https://<IDP_URL>/<Dynatrace app path>?target=<direct dashboard URL>. The feasibility of such an approach (and the way you would have to construct the URL) will depend on your specific IDP of course.