Hi @Heo Jaehyun
This may be caused by delay, please do not try to get an access token immediately after you grant permissions and admin consent, it may take some time for the permissions to take effect, please wait half a minute or so and try again.
Also, note that you must be an administrator to modify other users' information.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.