title: Auth0 Creating Office 365 Enterprise Users with roles in advance
body: <p>I am trying to port a dotnet app using identity and Office 365 to use Auth0. In my current set up, I create users and then use O365 for auth and then log users in locally after that. I need this as I am setting up permitted users and roles in advance.</p>
  <p>I can create a db user and assign a role in Auth0 no problem but there I cannot see a way to create a user in advance and assign it to an O365 account.</p>
  <p>I have set up a connection and can log in just fine with O365. It automatically creates a user with this connection and I can then assign the manually, but I need to define in advance which users are permitted to log in with O365 and add meta_data for them</p>
  <p>Am I missing something?</p>
  <p>Example:</p>
  <p>User A belongs to Org A. I don't want user B to be able to access resources using Org A O365 account. I also want User A to have Admin role so as soon as they login, they will have access to the admin panel.</p>
  <p>Right now, any user with 0365 account can log in and User A cannot access Admin Panel after login until I manually go to the user and add the Admin role.</p>
  <p>** What do I want **</p>
  <p>Ideally, I want to add all the permitted users to the &quot;database&quot; and assign them roles. If a user tries to log in with 0365, if they are not in the &quot;database&quot;, authentication will fail.</p>