Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have this use case and would really appreciate your help.
Use Case:
On the report, there are sections at the bottom like, Print Name:___________ and Signature:___________ and Date:____________________
When user A accesses the report, the Print Name should have his/her First Name space Last Name. The Signature will be a button, and when pressed, an email needs to be sent via Outlook to the manager with a link to the report and it should have the above name, signature (which is name again), and date printed on the report.
Is there a way to do that? Thanks heaps in advance
Solved! Go to Solution.
Thanks for the reply from BeaBF, please allow me to provide another insight.
Hi @Pker_Tank ,
Please refer to the following steps.
Register an application.
Register an application with the Microsoft identity platform - Microsoft Graph | Microsoft Learn
Add API License: Microsoft Graph User.Read.All permission for the application type and add the delegation.
Copy the tenant id, client id, and client secret.
Then use the following M code to get a list of all the users in the tenant.
let
clientId ="<Your clientId>",
tenantId = "<Your tenantId>",
clientSecret = "<Your clientSecret>",
tokenUrl = "https://login.microsoftonline.com/" & tenantId &"/oauth2/v2.0/token",
body=
[
client_id = clientId,
scope = "https://graph.microsoft.com/.default",
grant_type = "client_credentials",
client_secret = clientSecret
],
tokenResponse = Json.Document(Web.Contents(tokenUrl,
[
Content = Text.ToBinary(Uri.BuildQueryString(body)),
Headers = [Accept = "application/json"]
])),
AccessToken = tokenResponse[access_token],
Source = Json.Document(Web.Contents("https://graph.microsoft.com/v1.0/users",
[
Headers = [Authorization = "Bearer " & AccessToken]
])),
#"Converted to Table" = Table.FromList(Source[value], Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"businessPhones", "displayName", "givenName", "jobTitle", "mail", "mobilePhone", "officeLocation", "preferredLanguage", "surname", "userPrincipalName", "id"}, {"businessPhones", "displayName", "givenName", "jobTitle", "mail", "mobilePhone", "officeLocation", "preferredLanguage", "surname", "userPrincipalName", "id"})
in
#"Expanded Column"
Then use the following measure to show the display name of the currently logged in user.
PrintName = CALCULATE(MAX(Users[displayName]),Users[mail]=USERPRINCIPALNAME())
Create a Power Automate Flow visual to send emails. You can add fields as well as measures to include the information to be sent.
Create a Power Automate visual for Power BI - Power BI | Microsoft Learn
Add the Send an email (V2) action to Power Automate Flow and populate the options in it. And save the report and publish it to Power BI Service.
Create a separate page for displaying the target report. Copy the URL of the report page as the target report link for the email to be sent. Then click Save and Apply in the upper right corner.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from BeaBF, please allow me to provide another insight.
Hi @Pker_Tank ,
Please refer to the following steps.
Register an application.
Register an application with the Microsoft identity platform - Microsoft Graph | Microsoft Learn
Add API License: Microsoft Graph User.Read.All permission for the application type and add the delegation.
Copy the tenant id, client id, and client secret.
Then use the following M code to get a list of all the users in the tenant.
let
clientId ="<Your clientId>",
tenantId = "<Your tenantId>",
clientSecret = "<Your clientSecret>",
tokenUrl = "https://login.microsoftonline.com/" & tenantId &"/oauth2/v2.0/token",
body=
[
client_id = clientId,
scope = "https://graph.microsoft.com/.default",
grant_type = "client_credentials",
client_secret = clientSecret
],
tokenResponse = Json.Document(Web.Contents(tokenUrl,
[
Content = Text.ToBinary(Uri.BuildQueryString(body)),
Headers = [Accept = "application/json"]
])),
AccessToken = tokenResponse[access_token],
Source = Json.Document(Web.Contents("https://graph.microsoft.com/v1.0/users",
[
Headers = [Authorization = "Bearer " & AccessToken]
])),
#"Converted to Table" = Table.FromList(Source[value], Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"businessPhones", "displayName", "givenName", "jobTitle", "mail", "mobilePhone", "officeLocation", "preferredLanguage", "surname", "userPrincipalName", "id"}, {"businessPhones", "displayName", "givenName", "jobTitle", "mail", "mobilePhone", "officeLocation", "preferredLanguage", "surname", "userPrincipalName", "id"})
in
#"Expanded Column"
Then use the following measure to show the display name of the currently logged in user.
PrintName = CALCULATE(MAX(Users[displayName]),Users[mail]=USERPRINCIPALNAME())
Create a Power Automate Flow visual to send emails. You can add fields as well as measures to include the information to be sent.
Create a Power Automate visual for Power BI - Power BI | Microsoft Learn
Add the Send an email (V2) action to Power Automate Flow and populate the options in it. And save the report and publish it to Power BI Service.
Create a separate page for displaying the target report. Copy the URL of the report page as the target report link for the email to be sent. Then click Save and Apply in the upper right corner.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Pker_Tank Hi!
to display name and last name, you can create a measure with this funtion:
UserName = UserPrincipalName()
Userprincipalname function retrieves the email of the user that is using the Report, then you can modify it to obatin name and last name. If you can write me the form of your org email, i can help you to adjust the measure to obatin name space last name.
To create the button, you can insert a button that will be the trigger of a Power Automate Flow, you can't send email directly from power bi desktop.
BBF
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |