Skip to content

SPAppToken encryption change breaks SharePoint app #10505

@vvolodin

Description

@vvolodin

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

SharePoint Add-ins

Developer environment

None

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

While preparing to update our SharePoint Add-in to SPFX we started having a new issue. For some reason validation of the SPAppToken started failing in TokenHandler.

'System.NotSupportedException: IDX10634: Unable to create the SignatureProvider.
Algorithm: 'RS256', SecurityKey: 'Null'

After examining the token it now appears to report the algorithm used for its signature as RS256 which is not something that is symmetrically encrypted using our client id as it was for 9 years until now.

Steps to reproduce

  1. Create SP Addin
  2. Try to login via appredirect.aspx
  3. Token validation fails

Expected behavior

Token is encrypted with symmetric algorithm using client secret of our add-in.

Metadata

Metadata

Assignees

Labels

sharepoint-developer-supportsharepoint-developer-supporttype: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