Synchronize Office 365 Users to Wordpress


I am pretty new to Auth0 and I am currently trying to integrate Auth0 into wordpress.

The users authenticate with their Office 365 user and upon the first login the user is created in wordpress but I want the users to be automatically imported into wordpress beforehand. We have to run certain actions on the wordpress users before their first login manually. In addition we would appreciate the ability to assign the users in wordpress a role accordingly to their Office 365 assigned groups is this possible?

Any help is appreciated.