PowerApps - On App Start check if User belongs to SharePoint Group

Поділитися
Вставка
  • Опубліковано 5 вер 2024
  • This video explains how to check if current user belongs to SharePoint Group On App Start and Set the Startscreen based on membership.
    Video also explains OnStart and StartScreen Property and their usage and workaround.
    Below are formulas used:
    PowerAutomate
    ===============
    api call
    -------
    _api/web/sitegroups/getByName('Finance Group')/Users?filter=Email eq '@{triggerBody()['text']}'
    compose
    --------
    body('Send_an_HTTP_request_to_SharePoint')['d']['results']
    condition equals
    -----------
    equals(String(outputs('Compose')),'[]')
    PowerApps
    =============
    OnStart
    ------------
    Set(isMember,CheckFinanceGroupMembership.Run(User().Email).ismember);
    If(isMember = "True", Set(navigationTarget, "Scr_Search"), Set(navigationTarget, "Scr_NoAccess"))
    Timer controls
    =======
    AutStart :true
    OnTimerEnd
    -------------------
    If(navigationTarget = "Scr_Search", Navigate(Scr_Search),Navigate(Scr_NoAccess));

КОМЕНТАРІ • 10

  • @CephusJones
    @CephusJones 6 місяців тому +1

    This is brilliant. You are very patient and detailed and I learned a lot. Thanks so much!

  • @creativesruthi2101
    @creativesruthi2101 8 днів тому

    Thanks for the video , But i had to do one correction here in order for the query to run _api/web/sitegroups/getByName('Group Name')/Users?$filter=Email eq 'Email'..... to put the $ before the filter to filter out the query

  • @enitesh
    @enitesh Рік тому +2

    Nice video. An alternative approach would be to grant access to a list item only to the SP group and trying to access that item in PowerApps. Can avoid flow in that case.

  • @seanrhysmiller
    @seanrhysmiller Рік тому +1

    Had this issue just recently found a solution for SPO and DV access, but this is a good alternative.

  • @Soulebi03
    @Soulebi03 6 місяців тому +1

    thank you for this

    • @Soulebi03
      @Soulebi03 6 місяців тому

      your formula checks if the user group has 0 members in it. if it has multiple members it will always say true regardless if the indicated user email is in there

    • @m365techhelp
      @m365techhelp  6 місяців тому

      You're very welcome!

  • @cristobalandrescerongaldam6186

    Hi, for some reason the flow is running well but is always giving the VarIsMember value as false.. Any possible solution? everything is exactly as the flow in the video.

  • @MrAnonymous3333
    @MrAnonymous3333 Рік тому

    Perfect video, I was looking for this to check user is present in a user group or not
    I have a small request, if u can make video on this topic
    How to enable Run only user in Power Automate with SharePoint as data source for a manual Trigger flow. It's difficult for me to be provide run only use to few people