Skip to content

Fallback to username (email) if name is not available on msal account info#1162

Merged
hathind-ms merged 2 commits intomicrosoft:mainfrom
teresaqhoang:fixing-personal-acct-bug
May 22, 2023
Merged

Fallback to username (email) if name is not available on msal account info#1162
hathind-ms merged 2 commits intomicrosoft:mainfrom
teresaqhoang:fixing-personal-acct-bug

Conversation

@teresaqhoang
Copy link
Contributor

Motivation and Context

This PR contains changes to default to MSAL username (default value: email) if name is undefined on the account. This was causing the experience to break for personal accounts as most don't have "Name" attribute defined.

Fix for issue here: #912

Contribution Checklist

@teresaqhoang teresaqhoang changed the title Using username (email) if name is not available on msal account info Fallback to username (email) if name is not available on msal account info May 22, 2023
@teresaqhoang teresaqhoang requested a review from hathind-ms May 22, 2023 22:47
@teresaqhoang teresaqhoang added the PR: ready to merge PR has been approved by all reviewers, and is ready to merge. label May 22, 2023
@hathind-ms hathind-ms enabled auto-merge (squash) May 22, 2023 22:48
@hathind-ms hathind-ms merged commit bc65ed4 into microsoft:main May 22, 2023
@teresaqhoang teresaqhoang deleted the fixing-personal-acct-bug branch May 22, 2023 23:52
shawncal pushed a commit to shawncal/semantic-kernel that referenced this pull request Jul 6, 2023
… info (microsoft#1162)

### 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 contains changes to default to MSAL username (default value:
email) if name is undefined on the account. This was causing the
experience to break for personal accounts as most don't have "Name"
attribute defined.

Fix for issue here:
microsoft#912

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
golden-aries pushed a commit to golden-aries/semantic-kernel that referenced this pull request Oct 10, 2023
… info (microsoft#1162)

### 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 contains changes to default to MSAL username (default value:
email) if name is undefined on the account. This was causing the
experience to break for personal accounts as most don't have "Name"
attribute defined.

Fix for issue here:
microsoft#912

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [ ] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: ready to merge PR has been approved by all reviewers, and is ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants