I think there is no bypass, as the error message clearly states the problem:
UserHasNoMailboxAndNoLicenseAssignedError
The only solution will be... assign that user a license and create a mailbox.
On the other hand... how should we know if you just paste an error message in here without any explanation of what you are doing and how you are doing it?
Please tell us more about your solution and your problem. When does it happen? What are you trying to achieve with which steps/apps/scripts?