Thanks for the reply Jonathan.
I haven't been able to find anything yet within the framework. Seems a little strange that the script is unaware of who is running it.
Relying on the user to input who they are in probably not a realistic option unfortunately.
Unless anyone else has any thoughts then I guess the only option is an SOI as you suggest.