You can leverage Microsoft Graph's List users API to get the list of users in the directory and populate the dropdown.
URL GET https://graph.microsoft.com/v1.0/users
Sample response
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"displayName":"contoso1",
"mail":"'[email protected]",
"mailNickname":"contoso1_gmail.com#EXT#",
"otherMails":["[email protected]"],
"proxyAddresses":["SMTP:[email protected]"],
"userPrincipalName":"contoso1_gmail.com#EXT#@microsoft.onmicrosoft.com"
}
]
}
More details on the API here
Please note the permission requirements for this API
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…