Is it possible to generate a Managed Unit on the fly based on a users department or site code?

Hello,

Is it possible to generate a Managed Unit on the fly based on a users department or site code?

Client has large number of AD user accounts, wants to limit the view and modification to only users in same department or site code.

I was looking at Managed Units for the fix but the client has over 1000 departments / site codes.

Is it possible to generate an managed unit for the user to view only those users in their site?  without creating 1000+ MUs?

Like a on demand MU ?