This isn't possible with SPF. SPF is designed to authorise, or de-authorise a host to send mail; it is assumed that either you control that host and can authorise, or you don't, and therefore shouldn't.
That said, using SPF macros it is possible to construct an SPF record that only permits certain sender-parts, including certain usernames before the @
sign; but you can still only allow, or disallow, a given username in the declared sender, from given hosts; you can't say anything about how the process that generated this mail on the sending host, including whether it was controlled by one of "your" users or not.
(Edit: re your comment, no, it wouldn't. You could set up an SPF macro for example.com
that said that google's servers could only send mail claiming to be from, eg, [email protected]
, not just anyone@example.com
, but you still can't control (via SPF) whether it's sent by someone logged in to google as one of your users, or someone logged into google as someone else. Clearer?)
I'm afraid you're running into one of the problems with not controlling your email infrastructure: other people share it, and both they and the shared hosts are outside your control, so they may do stuff you don't like.