SharePoint / SharePoint/sp-dev-docs
Creating Team site with 'SharePointOnlineCredentials' no longer working ["Forwardable token to MSGraph is not available"]
@Ashlesha-MSFT is already working on this.
Since Jun 5, 2025.
- 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
- Find an old project that relies on the
SharePointOnlineCredentialsobject for auth - Attempt to create a Modern Team Site
Expected behavior
To provision a modern team site
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.