Hi @Taha Shahabuddin , After my testing the cause of the problem may be
The account you use to obtain a token through authentication is not an administrator account within the tenant
Only the administrator account has permission to create new users, you can go to the AD portal to set the currently logged in user as a global administrator and regain the token.
Hope this helps you and I wish you all the best.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.