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)
Solved! Go to Solution.
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]"
}
}
}
Hi @jjaramillo ,
At my knowledge, there are no powerapps APIs for us to use.
WorkAround:
1\ Share app with users with powershell.
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
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!
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]"
}
}
}
Hi @jjaramillo ,
That's cool! Thanks for sharing something not in the documentation.
Best Regards,
Wearsky
User | Count |
---|---|
10 | |
4 | |
3 | |
2 | |
1 |
User | Count |
---|---|
14 | |
8 | |
7 | |
3 | |
2 |