Thank you for posting your question in Microsoft Q&A.
I see that you are getting an error while trying to add a user. I also see that you have already given specific permissions.
Seems like you are using Microsoft Graph to perform this action and as we notice you have already got the permissions in place.
The permission that you have given is a "User.ReadWrite.All, Directory.ReadWrite.All" under delegated permissions.
To add a user, you will have to add the same permissions under application permissions as well.
The required permissions are as below,
Please add "User.ReadWrite.All, Directory.ReadWrite.All" permissions under application permissions as well.
You can also refer below article for more details.
https://learn.microsoft.com/en-us/graph/api/user-post-users?view=graph-rest-1.0&tabs=http#permissions
Do let me know if you have any questions.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.