SharePoint / SharePoint/sp-dev-docs

Creating Team site with 'SharePointOnlineCredentials' no longer working ["Forwardable token to MSGraph is not available"]

Open
#10,293 9 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Jun 5, 2025.

sharepoint-developer-support type:bug-confirmed type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

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

SharePoint CSOM

Developer environment

Windows

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

SharePointPnPCoreOnline 3.12.1908

Describe the bug / error

I have a VERY old solution, that has been running flawlessly since 2018, and now all of a sudden about two weeks ago it stopped working, flat out.

The solution is following the (dated) instructions from learn, here to create modern team sites.

Now all of a sudden I'm getting an error "Forwardable token to MSGraph is not available" (Code: "-1, Microsoft.Office.Server.Directory.DirectoryObjectUnauthorizedAccessException")

And while I appreciate that things have improved a lot since then, and that I should just move to Graph, that's no small feat to upgrade an old .NET Framework solution all the way up to be modern, and I'm not interested in a game of tug-of-war over the bill that my client would get if I had to spent hours upgrading this solution.

I'm more than happy to accept this as "the new way", if you can point me to a piece of documentation/blog where you announced this change, and I just missed it, but otherwise, this feels a little big like a rug-pull I know loads of orgs have older solutions still running where they no longer have contact to any of the devs that can help them fix it.

Steps to reproduce
  1. Find an old project that relies on the SharePointOnlineCredentials object for auth
  2. Attempt to create a Modern Team Site
Expected behavior

To provision a modern team site

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.