Grant Permission on Site fails silently

I have a workflow that creates a site, then grant permission to different users and groups using the action for that. I have set the ThrowError parameter to True.

The previous weeks, it seems like some of these grants are being ignored randomly. The workflow does not fail, but some of the permissions are not set.

There is an issue with granting permission action and our engineers are writing some additional code to resolve it.

The issue appears only if there are a lot of users and groups on the higher level site. The action breaks permissions inheritance and removes permissions from all those groups and users. Unfortunately, there is fixed timeout in SharePoint workflows that prevents actions from long running execution.

We will change architecture of the action to cover this case as well.

There is no estimated time but I will post information here right after it got resolved.

The bug was due to working with a large number of permissions on the sites, in this particular case - removal.
Removal of those permissions takes more time than Microsoft allows for calls to SharePoint API. We implemented asynchronous processing of requests like this and it was fixed.