Hi everyone,
I have designed a flow to grant custom access to items present in a SharePoint (User List). The flow looks like:
In the Grant access action below: I am providing the Edit access for the user and his/her immediate manager. Next actions which is the Get Items 2 action here I am retrieving the manager's RM details (for which I have used the filter query: Email eq 'ReportingManagerEmail').
a) Condition 1 :
Yes part:
And before granting the managers RM the access I have added a condition to see if the Get Items action 2 body response should be greater than 0 and the RM field should not be empty, if these two conditions are satisfied then only grant the Managers RM access else do nothing.
b) Condition - 1 : In condition-1 I am checking if the user manager field is empty or not, if it is not empty then it goes into Yes part (that I mentioned above) else if user has not been assigned any Manager then in such case only grant access to the user which is done in the No part of condition-1.
No part:
So the flow was working as expected when I did my testing part. But now when the application went into production we are getting 2500 items into the UserManagement list (that is been done through API call) so once the data is populated (all the records) then I am triggering this flow (it does take around 40-45 min to execute as the number of records are large and also there are some inner filters in the actions that I have used). So for some items (after the flow executed) I observed that it had failed :
(like 12-14 records) and the issue was 'Bad request': In Grant access to an item or folder action and for some items there was a timeout (429: Rate exceed) in Get Items 2 action:
429 Error on Get Items action:
Outputs : Throttling issue
Error: 400 on Grant access (It did mention the recipient email that I have masked out i.e. User Email and Managers Email
For the 400: Error I did come across one answer on Forum which suggested of using 'Send an HTTP request - Ensure' right before the Grant access action:
In the body of Send Http action it looks as follows:
{
'logonName': 'i:0#.f|membership|@{items('Apply_to_each')?['Email']};@{items('Apply_to_each')?['ReportingManagerEmail']}'
}I had referred the following post:
Reference Post
So is the action that I have used right?.
So if you guys have any idea about how to resolve the following issue, do let me know it will help me in debugging.
Regards,
Sidhant.

Report
All responses (
Answers (