I have to use Microsoft Active Directory APIs to create an active directory account which will then be synced with Azure. I am using Microsoft Graph SDK for PHP to implement the functionality.
- Created APP in AD account
- Retrieved TenantId, ClientId and Secreat keys.
- Using SDK, retrieved access token.
- Next called function to create user.
Here I initially got permission related issues. In AD APP, I gave full permission for directory read. In permissions section I could not find any permission option related to Create User. Also in "Microsoft Graph SDK for PHP", while using create user function, I am getting "Class 'User' not found in D:\xampp\htdocs\test\vendor\microsoft\microsoft-graph\src\Http\GraphResponse.php" error.
Here I would like to confirm if this is possible to create an active directory account which will then return license key in response to be used by the newly created user?
Any help would be greatly appreciated.
Many Thanks.
The permissions required for creating the user:
The request body for creating the user:
please refer this example:
Hope this helps.