-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
The Logic App is obscenely slow to run due to the way it chunks the requests.
You can significantly improve performance by composing the SCIM user component and appending it to a single array that contains all SCIM users. This ForEach should run in parallel.
Then, chunk(variable('allusers'),50) so you have an array of arrays which contain no more than 50 users each. Then, ForEach chunk, compose the starting part of the SCIM request, 50 user array, and ending part of the SCIM request.
@{variables('SCIMBulkPayload')}@{items('For_each')}@{variables('SCIMBulkPayloadEnd')}
The second ForEach should run sequentiall, and contain the POST action.
"Initialize_SCIMBulkPayload": {
"inputs": {
"variables": [
{
"name": "SCIMBulkPayload",
"type": "string",
"value": "{\n \"schemas\": [\n \"urn:ietf:params:scim:api:messages:2.0:BulkRequest\"\n ],\n \"Operations\": \n"
}
]
},
"runAfter": {},
"type": "InitializeVariable"
},
"Initialize_SCIMBulkPayloadEnd": {
"inputs": {
"variables": [
{
"name": "SCIMBulkPayloadEnd",
"type": "string",
"value": " ,\n \"failOnErrors\": null\n}"
}
]
},
"runAfter": {},
"type": "InitializeVariable"
}
Metadata
Metadata
Assignees
Labels
No labels