@Paul Potter Hello and welcome to Microsoft Q&A.
As I understand you seek a better way to handle and differentiate 'expected errors' and 'unexpected errors' in pipeline execution.
A note before I get into solutions: I see you are using Lookup activity, and probably have a great many results. Are you aware of the limits of Lookup activity? It returns first 5000 rows, or 4MB. I'm just trying to prevent future headaches if you seem to be missing some.
An ideal solution would be to somehow only retrieve the IDs of people with managers, and not accounts. However I'm not expert in Graph API, so I'll work with next best thing.
You have stated for all deparmental accounts you get the same expected error message. If we can assume this error message is unique to this situation, we can craft some logic to handle it and not fail the forEach. Also, deliberately fail the forEach if the error message is different.
To do this, I am thinking an If condition following your Copy Activity, connected by an on-fail dependency.
Since there is no success dependency coming out of the copy activity, the failure of copy activity will not fail the pipeline as long as the if condition succeeds.
For the condition , we can test for part of the error message with something like:
@less(1,indexof(activity('Copy data1').error.message,'does not exist or one of its queried reference-property objects are not present.'))
So we want the condition to be successful when the message contains part of your expected message.
When it doesn't we put a failure activity & message in the false branch.