To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi there.
For the past days, I have been assessing the feasibility of a workflow on a Power BI report on which I would like your input. Basically speaking:
Personally speaking, I have browsed the web for quite some time and it looks as if what I am trying to achieve is impossible / has no information anywhere. Nonetheless, I would really appreciate your guidance. For our own sake, let's say my starting ground is the following simple flow:
Achieving such a change would be massive for me, and I'd kindly appreciate any help. Is what I am trying to achieve somehow feasible by any mean? I would love to hear your thoughts!
Thank you.
Solved! Go to Solution.
Hi @ATB1999 , Thank you for reaching out to the Microsoft Community Forum.
This isn’t possible using Power BI and Power Automate alone, because flows run under the creator’s account, so actions like drafting an email will always affect your mailbox, not the user's.
The only way to draft the email in the clicking user’s inbox is by using the Microsoft Graph API with delegated permissions, which allows actions to run as the signed-in user. You can capture the user’s email in Power BI using USERPRINCIPALNAME(), then pass it to a flow via a button parameter. Inside the flow, format your table as HTML and use an HTTP action to call: POST https://graph.microsoft.com/v1.0/me/messages with a request body that sets isDraft: true. This creates the draft in the signed-in user’s mailbox.
To make this work, you'll need to register an Azure AD app with Mail.ReadWrite (delegated) permission and either use a custom connector or trigger the flow from Power Apps, which runs in the user’s context.
If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
Hi @ATB1999 , I hope you're doing well! Just checking in to see if you had a chance to review the details shared earlier. If any of the information addressed your needs, feel free to mark it as "Accept as Solution" or give it a 'Kudos' to help others in the community. Please let me know if you have any further questions!
Hi @ATB1999 ,
I hope the information shared was helpful. If you have any additional questions or would like to explore the topic further, feel free to reach out. If any of the responses resolved your issue, please mark it "Accept as solution" and give it a 'Kudos' to support other members in the community.
Thank you!
Hi @ATB1999 ,
I wanted to follow up and see if you’ve had a chance to review the information provided here.
If any of the responses helped solve your issue, please consider marking it "Accept as Solution" and giving it a 'Kudos' to help others easily find it.
Let me know if you have any further questions!
Hi @ATB1999 , Thank you for reaching out to the Microsoft Community Forum.
This isn’t possible using Power BI and Power Automate alone, because flows run under the creator’s account, so actions like drafting an email will always affect your mailbox, not the user's.
The only way to draft the email in the clicking user’s inbox is by using the Microsoft Graph API with delegated permissions, which allows actions to run as the signed-in user. You can capture the user’s email in Power BI using USERPRINCIPALNAME(), then pass it to a flow via a button parameter. Inside the flow, format your table as HTML and use an HTTP action to call: POST https://graph.microsoft.com/v1.0/me/messages with a request body that sets isDraft: true. This creates the draft in the signed-in user’s mailbox.
To make this work, you'll need to register an Azure AD app with Mail.ReadWrite (delegated) permission and either use a custom connector or trigger the flow from Power Apps, which runs in the user’s context.
If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
Hi. This is interesting. I'm really not sure if this will work but I was thinking about getting data from the dataset directly after the button. Once the button was clicked, call for executing a query to the semantic model. The DAX query executed could be just
EVALUATE {[MeasureWithUserName]}
That might bring the email back.
The measure it's just MeasureName = USERNAME() or try MeasureName = USERPRINCIPALNAME()
As guide to get started you can check this article (translate it to english) for understanding how query datasets from Power Automate to Power Bi works.
https://blog.ladataweb.com.ar/post/746743853368918016/powerbipowerautomate-enviar-notificación-de
I hope that helps,
Happy to help!