Azure Managed Grafana - embedding a graph on a webapp using AAD authentication

Alex-1534 0 Reputation points
2024-11-24T03:39:04.3566667+00:00

I am trying to embed our grafana dashboard to our web application. I found a solution that need to enable allowing anonymous access.

Is it possible to embed an Azure Managed Grafana dashboard in a web application so that only authenticated users can view it?

Azure Managed Grafana
Azure Managed Grafana
An Azure service used to deploy Grafana dashboards for analytics and monitoring solutions.
117 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ashok Gandhi Kotnana 1,855 Reputation points Microsoft Vendor
    2024-11-25T09:31:01.0333333+00:00

    Hi Alex-1534,

    Welcome to Microsoft Q&A Forum, thank you for posting your query here!

    Yes, it is possible to embed an Azure Managed Grafana dashboard in a web application and restrict access to authenticated users. Here's how you can do it

    1. Use Azure Active Directory (AAD) Authentication

    Azure Managed Grafana integrates with Azure Active Directory (AAD) for authentication. You can configure your Grafana instance to authenticate users via AAD. Here's how:

    • In Azure Portal, go to your Azure Managed Grafana resource.
    • Under Settings, select Authentication and authorization.
    • Enable Azure Active Directory as the authentication provider.
    • Ensure your web application also uses Azure AD for authentication, so users are authenticated using the same system.
    1. Restrict Access to the Dashboard

    In your Grafana instance:

    • Define user roles and permissions within Grafana to control access to specific dashboards.
    • Create viewer roles for users who should only see the embedded dashboard.
    1. Enable Embedding: In the Azure Managed Grafana instance, go to the Configuration tab and enable the "Allow embedding" option.
    2. Generate Embed Code: Open the Grafana dashboard you want to embed, click on the Share button, and select the Embed tab. Configure the options and copy the generated iframe code2.
    3. Integrate with Web Application: Paste the iframe code into your web application.
    4. Authentication: Ensure that your web application uses authentication to control access to the dashboard. Only authenticated users should be able to view the embedded dashboard.

    Please follow this step you can securely embed your Grafana dashboard in a web application and restrict access to authenticated users, let us know if any help, we will always help as you needed.! User's image

    Please do not forget to "Accept the answer” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.