Unable to process template language expressions in action 'Create_DLP_Policy_V2' inputs at line '0' and column '0': 'The template language expression 'body('Filter_array')[0]['defaultConnectorsClassification']' cannot be evaluated because array index '0' cannot be selected from empty array. Please see https://aka.ms/logicexpressions for usage details.'.
Your Filter array returned zero items, so [0] fails. The fix has two parts:
1)Why is the array empty? (diagnose and correct the filter so it returns exactly 1 policy)
2)Guard your expression so the flow doesn’t crash if a match isn’t found (good hygiene even after you fix the filter).
Before using it, check if it has a value at 0 index in a condition: body('Filter_array')[0]['defaultConnectorsClassification']
length(body('Filter_array'))
Like below example:
if true, then you have value in it and you can use it, if false they you have not received a value, might me a misconfiguration in filter.
Common reasons for no matches
Wrong property name: e.g., you filtered on name but the JSON has displayName.
Case/whitespace mismatch: “Finance DLP” ≠ “finance dlp”.
Wrong scope: Tenant policy vs Environment policy. If you’re cloning an environment policy, make sure the List action is scoped or filtered correctly by environment.
Not in this geo/tenant: Verify you’re in the correct environment/region.
Permissions: The “Power Platform for Admins” connector requires sufficient admin rights to list tenant policies.
✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
👍 Feel free to Like the post if you found it useful.
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.