- Create a public client app registration in your app’s respective tenants or directories as a public client, then securely store the client IDs and Client Secrets provided for the API calls.
- When asked who can use this application or access this api, choose Accounts in any organizational directory.
- In the Microsoft Graph section, grant permissions to
Directory.Read.AllandUser.Read. - If your app is B2C, set up a resource owner password credentials flow in Azure Active Directory B2C.