Skip to content

SPFx Teams Tab (windows client), AcquireOBOToken 400 (guest access only) #6136

@mdanielcristian

Description

@mdanielcristian

Category

  • Bug

Describe the bug

I have a SPFx teams tab. The SPFx tab is using AadTokenProvider in order to get a token to access a resource. Trying to access that tab:

  • browser client, normal user, WORKS, correct token returned, I am able to access the resource using that token
  • native client (windows), normal user: WORKS
  • browser client, guest user, WORKS
  • native client (windiws), guest user DOES NOT WORK

So when I try to get a token in the native client, while logged in with a guest user, the call fails. Using fiddler, I can see the following call:
GET: /sites/{teamSite}/_api/Microsoft.SharePoint.Internal.ClientSideComponent.Token.AcquireOBOToken?resource='{protectedResource'&clientId='{correct id of SharePoint Online Client Extensibility Web Application Principal'

Response: 400 - Missing refresh token
image

Steps to reproduce

  1. Login as a guest to a team
  2. Access a SPFx tab in that team
  3. The tab is using AadTokenProvider.getToken('{resourceUid}') in order to get a token for the current user
  4. The call fails, and the above error is visible in Fiddler

Expected behavior

AadTokenProvider.getToken('{resourceUid}') returns a valid token.

Environment details (development & target environment)

  • Your Developer Environment: Windows 10
  • Target Environment: Teams
  • Framework: SPFx v1.10.0
  • Browser(s): Native Client onlu
  • Tooling: VS Code, SPFx v1.10.0

Additional context

Same exact scenario work in the browser client (guest user) and all scenarios for a normal user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authCategory: Authentication (Azure AD / etc)area:spfxCategory: SharePoint Framework (not extensions related)type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions