The IDs to use for Bot Framework are in most cases easy to find, because you receive them in the "Activity" object that is sent to the bot when the user initiates contact.
However, I am trying to use the Create Conversation endpoint, which means I have to know the ID of the user and the bot.
A simplified request (that works!) like this:
{
"bot": {
"id": "28:4a4f500c-4897-4eaf-a364-c67942f41f6f"
},
"members":[{
"id": "29:1DUjC5z4ttsBQa0fX2O7B0IDu30R_6SfPMhwj-E1BwWmvYzb_IElqJwzPDocwPxTS0j8clYeb8gZx67V8TuChbA"
}],
"tenantId": "c7392b95-d07b-4653-87a7-6c709f527c42"
}
I need to find the user id (member id) somehow, maybe through Graph API? Or maybe through the Bot Framework API? But how?
Additionally, I'd like to be able to also programmatically find the Bot ID because I would be deploying this bot to many tenants and it would simplify the configuration a lot. However, where do I find the Bot ID, even manually? It doesn't look like it is the App Id from Azure or the Object id.
(I understand the prefix of 28 and 29, so that is not related to my question)
UPDATE:
The key take aways from the accepted answer are the following:
The userId is unique to your bot ID and a particular user. You cannot reuse the userId between bots. The channelId is global.
This means I cannot hope to find the userId somewhere else and that is a very important piece of information.
When your app is installed in any particular context, you receive an onMembersAdded activity.
Apparently I can expect to receive a message in my bot even if the bot is just installed for a user. This would be my opportunity to find the userId.
When I try this out, I will confirm here whether that indeed happens in my scenario, which is a bot in a Personal Tab.