I have a bot service which integrates with Teams. All the interactions will happen via Teams. Their access to Teams serves as their authentication into our system.
The question is whether I should use the Teams ID or the Azure Active Directory (AAD) Object ID as the unique identifier for that user. What are the pros/cons of each? What are other considerations I should factor in. Is either of them more likely to change? What am I not considering that I should be considering?
Azure Active Directory (AAD) Object ID is the best way to uniquely identify the user.
Also Multiple Teams can contains same users, so if you need a requirement where you want to uniquely identity the user's in different Teams, you can use a custom combination of (Team Id + AAD Object Id).