web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Share an app through a...
Power Apps
Answered

Share an app through an api

(0) ShareShare
ReportReport
Posted on by 16

Hi there community

Is there an api endpoint that allows me through a rest request to share an app with a AAD team (or users)

I have the same question (0)
  • KubraS Profile Picture
    2 on at

    Hi everyone, I want to share my power apps web api endpoint with other people. Is there anyone tried it before?

  • v-xiaochen-msft Profile Picture
    on at

    Hi @jjaramillo ,

     

    That's cool! Thanks for sharing something not in the documentation.

     

    Best Regards,

    Wearsky

  • Verified answer
    jjaramillo Profile Picture
    16 on at

    On the other hand, I've tried to use the GrantAccess operation from the dataverse api with no success

    (I can make the post request, however, i get an empty 204 response from the server, and If I check the share functionality from the ui I see no changes)

    This is the body in case anyone has any info on the matter:

    {
     "Target": {
     "@odata.type": "Microsoft.Dynamics.CRM.canvasapp",
     "canvasappid": "[app guid]"
     },
     "PrincipalAccess": {
     "@odata.type": "Microsoft.Dynamics.CRM.PrincipalAccess",
     "AccessMask": "ReadAccess",
     "Principal": {
     "@odata.type": "Microsoft.Dynamics.CRM.team",
     "ownerid": "[team guid]"
     }
     }
    }
  • jjaramillo Profile Picture
    16 on at

    Did a little bit of digging and you can actually use the same apis the powershell command uses (which btw are the same that the ui use when you do the process from the "share" button on the app.

    I case someone is wondering this is the endpoint (POST):

    {{powerappsUrl}}scopes/admin/environments/{{environmenName}}/apps/{{appId}}/modifyPermissions?api-version=2016-11-01&$filter=environment%20eq%20'{{environmenName}}'

    Where:

    As for the body I used the following json object:

    {
     "put": [
     {
     "properties": {
     "NotifyShareTargetOption": "DoNotNotify",
     "roleName": "CanView",
     "capabilities": [],
     "principal": {
     "email": null,
     "type": "Group",
     "id": "[azureactivedirectoryobjectid]",
     "tenantId": "null"
     }
     }
     }
     ]
    }

    The parameters for this call can be found here on the Set-AdminPowerAppRoleAssignment command documentation

     

    Cheers!

  • v-xiaochen-msft Profile Picture
    on at

    Hi @jjaramillo ,

     

    At my knowledge, there are no powerapps APIs for us to use.

    WorkAround:

    1\ Share app with users with powershell.

    https://docs.microsoft.com/en-us/powershell/module/microsoft.powerapps.administration.powershell/set-adminpowerapproleassignment?view=pa-ps-latest

     

    2\ Use Powerapps for admin connector.

    A nice blog which shows how to use this connector.

    https://www.c-sharpcorner.com/article/automate-powerapps-app-sharing/

     

    Best Regards,

    Wearsky

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 422

#2
WarrenBelz Profile Picture

WarrenBelz 380 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard