title: How to combine AD B2C(MSAL) and CosmosDB
body: <p>I'm using appcenter Auth and Data in my Xamarin forms Application, but microsoft are shutting down these services so i now need to do it myself.
  Atm these two allowed me to verify my users with ADB2C and then grant them to access there own and shared content in the Cosmos Database.</p>
  
  <p>What i have atm:
  I can log in via MSAL to my AD B2C.
  I can access my DB with Microsoft.Azure.DocumentDB.Core.</p>
  
  <p>What i need is:
  I need to be able to generate Ressource Token and configure the Database so only the User can access their documents.(Only found outdated and poorly described Tutorials)</p>
  
  <p>Or as an alternative:
  How is it possible to create Azure functions that only User which are logged in via msal can call?
  And then i would need the user id in the Azure function to check against the db.(All the Tutorials handle the user verification on the api call, this is not possible when calling from application)</p>