0

I have built a powerapp form for requesting access to certain groups. This app is then submitted into the SharePoint list. In this list it stores the information based on the user who has created the information however there is a need to find out where the user is located globally as a power bi report will be built based on the requests submitted.

How can this be possible? If you need to call to a rest api where could this be done? As i am new to rest api's. How can the information be stored into the list? Or does this need to be separate?

Thanks

  • Whats the difference to REST API and the office 365 connector get user profile in f flow and writing this back to the sharepoint list? – Danielle Sutton Sep 27 '18 at 13:34
0

Now I haven't been using powerapps a lot, but I beleive they do trigger normal Designer workflows. If that's the case you could create a workflow which hits this endpoint with the user id:

/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|xx@siteurl.onmicrosoft.com'

From there it should be possible to get the user location - provided the location field is in fact filled out. Then you can update the item itself with the information.

You will have to fiddle a bit with it though, but it shouldn't be too complicated. For reference on how to trigger the rest api from a workflow take a look here: https://cann0nf0dder.wordpress.com/2017/06/25/sharepoint-designer-2013-workflows-and-get-rest-api/

  • thanks! unfortunately sharepoint designer workflows aren't available but flow is. is is possible with this? the user location wont be filled out but is it possible to make this populated? based on the created by field? – Danielle Sutton Sep 27 '18 at 10:20
  • I would be very surpriced if Flow supports webservices. Regarding the user location it's the field on the user profile, not a field in the form. So to answer your question yes it can be based on the created by field - if you find a way to actually call the rest api from the list automatically :) – Morten K Sep 27 '18 at 10:30
  • i guess that's what i'm looking for. how to complete that form the list to populate the users information using flow i believes it is achievable just how is my question – Danielle Sutton Sep 27 '18 at 10:43
  • Well you would have to dig into the Flow options then. Like I said I'm not a huge fan of Flow and thinks it's severely limited, but it might get you where you want to be. Be sure to check out that the flow fires for all users - in general flow tends to be made for the creater of the flow primarily. – Morten K Sep 27 '18 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.