Hello Bertrand Lin,
Thank you for reaching out to Microsoft Support!
Use the List licenseDetails
endpoint to list Licenses granted to users, see the documentation for details.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.