Hello,
I'm using the Edit App Role Assignment action from the Power Apps Makers connector (Power Apps for Makers - Connectors | Microsoft Learn) to share a Power Apps application to a set of users from a Power Automate flow based on a external event.
Strangely, it seems that the action doesn't work all the time. Indeed, it happens that the flow calls the action for a specific user and the action response says that everything went well (response 200 from the action) but the app is not shared. As of now, it happened 5 times for a total of around 600 users.
Here is the details of the parameters passed to the action to share the application :
The properties/principal/id value is retrieved from the Get user profile (v2) action of the Office 365 Users connector (Office 365 Users - Connectors | Microsoft Learn).
Here is the response that is returned by the action :
{
"statusCode": 200,
"headers": {
"Vary": "Accept-Encoding",
"Strict-Transport-Security": "max-age=15724800; includeSubDomains,max-age=31536000; includeSubDomains",
"x-ms-islandgateway": "GA0000000",
"x-ms-request-id": "francecentral:4d6d0fae-f9bb-4a22-96b2-1ee9c5e52166",
"x-ms-correlation-request-id": "1e5629f8-784c-43a4-a01a-24ee343bf82d",
"x-ms-client-request-id": "1e5629f8-784c-43a4-a01a-24ee343bf82d",
"x-servicefabric": "NoRetry",
"x-ms-service-request-id": "1324b184-0910-4249-af8a-fb42a66f969a",
"x-ms-correlation-id": "1e5629f8-784c-43a4-a01a-24ee343bf82d",
"x-ms-activity-vector": "IN.0G.IN.02.00",
"Server-Timing": "x-ms-igw-upstream-headers;dur=2785.0,x-ms-igw-req-overhead;dur=0.2",
"X-Content-Type-Options": "nosniff",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"x-ms-apihub-obo": "true",
"Cache-Control": "no-store, no-cache",
"Date": "Mon, 05 Sep 2022 12:43:08 GMT",
"Content-Length": "1118",
"Content-Type": "application/json; charset=utf-8"
},
"body": {
"put": [
{
"id": "/providers/Microsoft.PowerApps/apps/[Unique ID of the app]/permissions/[Unique ID of the user]",
"properties": {
"roleName": "CanView",
"scope": "/providers/Microsoft.PowerApps/apps/[Unique ID of the app]",
"principal": {
"id": "[Unique ID of the user]",
"email": "[Email of the user]",
"type": "User"
},
"resourceResponses": [
{
"id": "/providers/Microsoft.PowerApps/apps/[Unique ID of the app]",
"statusCode": "Created",
"responseCode": "ResourceShared",
"message": "This was shared with 'CanView' permission.",
"type": "/providers/Microsoft.PowerApps/apps"
},
{
"id": "/providers/microsoft.powerapps/apis/shared_office365users",
"statusCode": "OK",
"responseCode": "NonsharableResource",
"message": "This cannot be shared.",
"type": "/providers/Microsoft.PowerApps/apis"
},
{
"id": "/providers/Microsoft.PowerApps/apis/[Unique name of a custom connector]",
"statusCode": "OK",
"responseCode": "InsufficientPermission",
"message": "This was shared without the necessary permissions, and may not work as expected.",
"type": "/providers/Microsoft.PowerApps/apis"
}
]
}
}
]
}
}
So, everything seems to be ok without any error.
Do you have an idea for why the sharing process sometimes doesn't work whereas the connector says that everything went well ?
Thanks

Report
All responses (
Answers (