Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Embed Powerapp on Dashboard

(0) ShareShare
ReportReport
Posted on by 72

Hello,

I was working on a PowerApp which was to be embedded on a dashboard.

I found IFrame was an option for this but I wanted to pass a parameter which has GUID of current logged in user; since I was to use that in my PowerApp.

Any suggestions around this?

  • Suggested answer
    Shawnsauve Profile Picture
    1,093 on at
    RE: Embed Powerapp on Dashboard

    Yes, you can pass parameters to a PowerApp embedded in an IFrame on a dashboard. Here are some steps you can follow to pass a parameter with the GUID of the current logged-in user:

    In your PowerApp, create a variable to store the GUID of the current user. You can do this by adding a new variable and using the formula:

    User().Email

    This will return the email address of the current user, which you can then use to look up the user's GUID from your data source.

    Modify your PowerApp to accept a parameter for the user GUID. You can do this by adding a parameter to the app's OnStart function:

    OnStart: ClearCollect(MyUser, { UserID: Param("UserID") })

    In your dashboard, create an IFrame to embed the PowerApp. In the URL for the IFrame, include the parameter for the user GUID:

    web.powerapps.com/.../{YourAppID}

    Replace {YourAppID} with the ID of your PowerApp, and {GUID} with the value of the user's GUID.

    In your PowerApp, use the MyUser collection to retrieve the value of the UserID parameter:

    First(MyUser).UserID

    This will return the value of the UserID parameter, which you can use in your app's logic to filter data or perform other actions based on the current user.

    Note that you will need to ensure that the user's GUID is accessible to the dashboard and the PowerApp. You may need to modify security settings or configure a data source to retrieve the user's GUID from your system.

  • Mansi M Profile Picture
    72 on at
    Embed Powerapp on Dashboard

    Hello,

    I was working on a PowerApp which was to be embedded on a dashboard.

    I found IFrame was an option for this but I wanted to pass a parameter which has GUID of current logged in user; since I was to use that in my PowerApp.

    Any suggestions around this?

  • Suggested answer
    DAnny3211 Profile Picture
    9,276 Moderator on at
    RE: Embed Powerapp on Dashboard

    hi

    to pass a parameter with the GUID of the current logged in user to a PowerApp embedded in an IFrame on a dashboard in Dynamics 365, you can use the following steps:

    Create a custom entity in Dynamics 365 to store the GUID of the current logged in user.

    Add a plugin to the custom entity that retrieves the GUID of the current logged in user and saves it to the custom entity record.

    Add a web resource to the custom entity form that contains JavaScript code to retrieve the GUID of the current logged in user and call the Dynamics 365 Web API to save the GUID to the custom entity record.

    In the IFrame URL for the PowerApp, add the GUID parameter and set its value to the GUID of the custom entity record.

    Here are the detailed steps for each of the above:

    Create a custom entity in Dynamics 365:

    a. Navigate to Settings > Customizations > Customize the System.

    b. Expand the Entities section and click New to create a new entity.

    c. Name the entity something like "Current User GUID" and give it a unique display name.

    d. Add a single text field to the entity to store the GUID.

    Add a plugin to the custom entity:

    a. Navigate to Settings > Customizations > Customize the System.

    b. Expand the Components section and click New > Plug-in to create a new plugin.

    c. Set the Primary Entity to the custom entity created in step 1.

    d. Set the Message to RetrieveMultiple.

    e. Set the Execution Mode to Synchronous.

    f. In the Plugin Registration Tool, register a step for the plugin to run on RetrieveMultiple of the custom entity.

    g. In the plugin code, retrieve the GUID of the current logged in user and save it to the custom entity record.

    Add a web resource to the custom entity form:

    a. Navigate to the custom entity created in step 1 and add a new field to the form.

    b. Set the Data Type to Web Resource and select a new web resource.

    c. Create a new web resource with type "Webpage (HTML)" and add JavaScript code to retrieve the GUID of the current logged in user and call the Dynamics 365 Web API to save the GUID to the custom entity record.

    Add the GUID parameter to the IFrame URL:

    a. In the PowerApp, create a new parameter to receive the GUID of the current logged in user.

    b. In the IFrame URL for the PowerApp, add the GUID parameter and set its value to the GUID of the custom entity record. You can use a formula to retrieve the GUID value from the custom entity record.

    With these steps, you should be able to pass the GUID of the current logged in user as a parameter to a PowerApp embedded in an IFrame on a dashboard in Dynamics 365.

    DAniele

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,336 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans