mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR adds support for fetching user data for each user in a chat session, allowing us to display usernames instead of GUIDs in user lists. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> - User data is loaded per conversation for optimization but only fetched per user. - Fetched user data is stored and indexed globally, since users can be part of multiple chats. - User data is fetched only if the user exists in the same tenant as the active user due to AAD access restrictions, otherwise, user display name will be "External Guest". > Note: right now, external user's names will show up in the chat history since we save user names as part of the chat message, but this will be removed in future work: https://github.com/orgs/microsoft/projects/852?pane=issue&itemId=29734028  ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) - [x] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with `dotnet format` - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: Shawn Callegari <[email protected]>