Hi @xi ouyang
Please note the following:
- Make sure you are not using the client credential flow.
- Make sure you are using a work account and not a personal account.
- Important: This error may also be caused if you are using a guest account, because guest users cannot enumerate all users by default, you need to set the same access permissions as members for guest users, or grant user administrators for your guest users. Log in to the Azure portal as a global administrator, and then go to: User settings>Manage external collaboration settings>Guest user access:
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.