cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
magonzalez
Regular Visitor

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
Community Support

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
Regular Visitor

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
Community Support

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
Did you attend MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’ve streamed the digital event live, or you're watching on-demand, claim your attendee badge to sport on your profile.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,330)