Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSO will fail when email is not identical to login #185

Open
adilei opened this issue Mar 14, 2024 · 2 comments
Open

SSO will fail when email is not identical to login #185

adilei opened this issue Mar 14, 2024 · 2 comments
Assignees
Labels
bug Something isn't working SharePointSSOComponent

Comments

@adilei
Copy link
Collaborator

adilei commented Mar 14, 2024

What sample tool are you using?
SharePoint SSO Component

Describe the bug
Currently, the SharePoint SSO Component uses userEmail to build a token request. For organizations where email addresses and login names are not identical, this is likely to fail.

See this issue: #182

@adilei adilei added bug Something isn't working SharePointSSOComponent labels Mar 14, 2024
@adilei adilei self-assigned this Mar 14, 2024
@sudburyr0x
Copy link

Is there an easy fix to this to use the login name instead? Currently facing this issue. Thank you!

@adilei
Copy link
Collaborator Author

adilei commented Jun 12, 2024

In pvaSso/PvaSsoApplicationCustomizer.ts line 116, change user.Email to user.loginName

  private _renderPlaceHolders(): void {
    // Handling the bottom placeholder
    if (!this._bottomPlaceholder) {
      this._bottomPlaceholder = this.context.placeholderProvider.tryCreateContent(
        PlaceholderName.Bottom,
        { onDispose: this._onDispose }
      );

      // The extension should not assume that the expected placeholder is available.
      if (!this._bottomPlaceholder) {
        console.error("The expected placeholder (Bottom) was not found.");
        return;
      }
      const user = this.context.pageContext.user;
      const elem: React.ReactElement = React.createElement<IChatbotProps>(Chatbot, { ...this.properties, **userEmail: user.email**, userFriendlyName: user.displayName });  
      ReactDOM.render(elem, this._bottomPlaceholder.domElement);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SharePointSSOComponent
Projects
None yet
Development

No branches or pull requests

2 participants