cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
magonzalez
Level: Powered On

Using an http trigger called from Sharepoint, how can I get current user with security or how can I trigger "for selected item" from a customized page?

I have a customized page, where I implement a dataview with elements of a Sharepoint list.

I have a button for any of these elements, this button calls a flow that receives the id of the item.

That is great until here.

I could pass the id of the Sharepoint user to know who is the user. Nonetheless, it could be hacked.

That is why I ask which are the best options to know really from the credentials who is the executing current user.

We have to take into account that it is a customized page, that I cannot use "when an item is created or modified".

 

I think of 2 solutions:

- call a "for selected item" trigger, as you can do in out-of-the-box views of the lists, but I don't see how, what javascript to use or what service to call.

Has anybody any idea about this?

- call a Sharepoint workflow that identifies the current user and then call the flow from there, once I know the current user. Ugly solution, mixing both technologies, one of then old.

 

Any other idea?

3 REPLIES 3
Community Support Team
Community Support Team

Re: Using an http trigger called from Sharepoint, how can I get current user with security or how can I trigger "for selected item" from a customized page?

Hi @magonzalez ,

 

Your first solution seems to work.

You could use For a selected item as the trigger and then use the user id to get information about the current user.

Image reference:

38.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
magonzalez
Level: Powered On

Re: Using an http trigger called from Sharepoint, how can I get current user with security or how can I trigger "for selected item" from a customized page?

But I can't use "for selected item" because it is a customized page, written with javascript / html or with react, you can only use selected item from dataviews out-of-the-box, as far as I know. 

 

My question is how can you do that without dataviews out-of-the-box?

 

Thx.

Community Support Team
Community Support Team

Re: Using an http trigger called from Sharepoint, how can I get current user with security or how can I trigger "for selected item" from a customized page?

Hi @magonzalez ,

 

Unfortunately, For a select item seems to only work on the default interface of SharePoint list/Library.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 496 members 4,631 guests
Please welcome our newest community members: