Scripts, services and tools that sign in to SharePoint Online or OneDrive for Business with a username and password through IDCRL now fail: SharePointOnlineCredentials in CSOM, direct calls to rst2.srf and idcrl.svc, and old SharePoint Online Management Shell sign-ins. Microsoft's schedule: blocked by default from February 16, 2026, for good from May 1, 2026. Here is how to find what still depends on IDCRL and move each piece to OAuth tokens from Microsoft Entra ID.
| Date | What Microsoft announced |
|---|---|
| March 28, 2025 | From this release, the SharePoint Online Management Shell signs Connect-SPOService in with OAuth instead of IDCRL (MC1028318). |
| October 29, 2025 | Microsoft announces the removal of IDCRL from SharePoint Online and OneDrive for Business. MC1184649 follows on November 11. |
| February 16, 2026 | Legacy client authentication blocked by default. Admins can take a one-time extension. |
| April 30, 2026 | The extension ends. |
| May 1, 2026 | Scheduled start of the permanent block: from this date, legacy authentication can't be re-enabled. |
| May 13, 2026 | MC1184649 update: the rollout has started and is expected to reach 100% of production within weeks. |
The extension set AllowLegacyAuthProtocols and LegacyAuthProtocolsEnabled to $true with Set-SPOTenant. That no longer brings IDCRL back: the only fix is to change how each client signs in.
ClientContext.Credentials to SharePointOnlineCredentials (package Microsoft.SharePointOnline.CSOM): services, scheduled jobs, upload tools, and PowerShell scripts that load the CSOM assemblies. Microsoft's blog post counts any use of the class as a sign of IDCRL calls, unless the code switches it to OAuth with the updated package (section 2). An app password in place of the password doesn't help: on Microsoft Q&A, a user who tried to sign in with an app password got the 'Forbidden' version of the error in section 1.https://login.microsoftonline.com/rst2.srf and trades it at https://TENANT.sharepoint.com/_vti_bin/idcrl.svc for the SPOIDCRL cookie, and calls to GetAuthenticationCookie.Connect-SPOService -Credential used IDCRL unless the script also passed -ModernAuth $true with -AuthenticationUrl (an option from version 16.0.22601.12000).People who use SharePoint in a browser or the Microsoft 365 apps typically aren't affected.
Errors. Microsoft's Set-SPOTenant reference shows this error when legacy authentication is off:
Cannot contact web site 'https://contoso-admin.sharepoint.com/' or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'.
The underlying error is "Access denied. Before opening files in this location, you must first browse to the web site and select the option to login automatically." On Microsoft Q&A, a user reports the first message with the status code 'Forbidden' instead of 'Unauthorized'.
Audit log. In the Microsoft Purview portal, open Audit, enter IDCRLSuccessSignIn in the Activities - operations names field, and search; you need the Audit Logs or View-Only Audit Logs role. Export the results: the account, the timing (hourly or daily hits from a service account) and any client details the records include, such as user agent or client IP, point to the job. The event logs successful IDCRL sign-ins, so it shows what used IDCRL before the block, within your retention (180 days by default with Audit (Standard)).
Code and servers. Search repositories, scheduled tasks and config for SharePointOnlineCredentials, rst2.srf, idcrl.svc, SPOIDCRL, GetAuthenticationCookie, and Get-Credential or -Credential in SharePoint scripts. Check the Management Shell version wherever admin scripts run:
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select-Object Name, Version
Microsoft released an updated Microsoft.SharePointOnline.CSOM package (version 16.1.26615.12013 or later, per Microsoft's Japan SharePoint support blog) in which SharePointOnlineCredentials can switch to OAuth. This is for .NET Framework code: CSOM for .NET Standard doesn't support the class.
ctx.Credentials = new SharePointOnlineCredentials(userName, securePassword, useModernAuth: true, interactiveAuth: false);
// tenant with MFA: a person completes the sign-in
ctx.Credentials = new SharePointOnlineCredentials(userName, securePassword, useModernAuth: true, interactiveAuth: true);
Microsoft says GetAuthenticationCookie is being deprecated in the newer package and replaced by AcquireTokenAsync, which gets an OAuth token. This route still keeps a password in your code or config and needs a person once MFA applies, so treat it as a bridge. For unattended jobs, Microsoft points to app-only authentication.
Use this for tools a person runs. Register an app in Microsoft Entra ID, add the Mobile and desktop applications platform with the redirect URI http://localhost, add a SharePoint delegated permission such as AllSites.Read or AllSites.Manage, and have an admin grant consent. Users still need their own access to each site.
var pca = PublicClientApplicationBuilder.Create(clientId)
.WithAuthority(new Uri($"https://login.microsoftonline.com/{tenantId}"))
.WithRedirectUri("http://localhost") // needed for the system browser
.Build();
var result = await pca
.AcquireTokenInteractive(new[] { "https://contoso.sharepoint.com/.default" })
.WithUseEmbeddedWebView(false) // system browser, also on .NET Framework: password and MFA happen there
.ExecuteAsync();
using var ctx = new ClientContext("https://contoso.sharepoint.com/sites/finance");
ctx.ExecutingWebRequest += (s, e) =>
e.WebRequestExecutor.RequestHeaders["Authorization"] = "Bearer " + result.AccessToken;
Add a token cache and call AcquireTokenSilent first, so users aren't prompted on every run. Skip the password-grant (ROPC) sample in Microsoft's CSOM for .NET Standard article: Microsoft recommends against ROPC because it's incompatible with MFA.
For services and scheduled jobs, the app signs in as itself. SharePoint's CSOM and REST APIs need a certificate for that: Microsoft says other options, such as a client secret, end in Access Denied. Upload the certificate's .cer file to the app registration, add the SharePoint application permission Sites.Selected, and have an admin grant consent. Anyone with the certificate and its private key can use the app, so keep the key out of source control.
var cca = ConfidentialClientApplicationBuilder.Create(clientId)
.WithCertificate(certificate) // X509Certificate2 with the private key
.WithAuthority(new Uri($"https://login.microsoftonline.com/{tenantId}"))
.Build();
string[] scopes = { "https://contoso.sharepoint.com/.default" };
using var ctx = new ClientContext("https://contoso.sharepoint.com/sites/finance");
ctx.ExecutingWebRequest += (s, e) =>
{
// AcquireTokenForClient checks MSAL's app token cache itself
var token = cca.AcquireTokenForClient(scopes).ExecuteAsync().GetAwaiter().GetResult();
e.WebRequestExecutor.RequestHeaders["Authorization"] = "Bearer " + token.AccessToken;
};
With Sites.Selected, the app reaches no site until an admin grants it one, as read, write, manage or fullcontrol, through Microsoft Graph (POST https://graph.microsoft.com/, which takes Sites.FullControl.All) or PnP PowerShell:
Grant-PnPEntraIDAppSitePermission -AppId <client-id> -DisplayName "Nightly export" -Permissions Write -Site https://contoso.sharepoint.com/sites/finance
SharePoint and Microsoft Graph each have a Sites.Selected permission; CSOM and SharePoint REST need SharePoint's. Microsoft calls Graph the primary choice, with SharePoint REST as the alternative. Our guide to moving SharePoint app-only code off Azure ACS covers the same setup in more detail.
The same two kinds of sign-in, in PnP and in Microsoft's admin module:
// PnP Framework (C#)
var auth = AuthenticationManager.CreateWithCertificate(clientId, certificate, "contoso.onmicrosoft.com");
// a person at the keyboard: AuthenticationManager.CreateWithInteractiveLogin(clientId, tenantId: "contoso.onmicrosoft.com")
using var ctx = await auth.GetContextAsync("https://contoso.sharepoint.com/sites/finance");
# PnP PowerShell
Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/finance -Interactive -ClientId <client-id>
Connect-PnPOnline -Url https://contoso.sharepoint.com/sites/finance -ClientId <client-id> -Tenant contoso.onmicrosoft.com -CertificatePath .\job.pfx
# SharePoint Online Management Shell
Connect-SPOService -Url https://contoso-admin.sharepoint.com
Connect-SPOService -Url https://contoso-admin.sharepoint.com -ClientId <client-id> -TenantId <tenant-id> -CertificateThumbprint <thumbprint>
-ClientId) since September 9, 2024; Register-PnPEntraIDAppForInteractiveLogin and Register-PnPEntraIDApp create one.Sites.FullControl.All application permission (Office 365 SharePoint Online), not the Microsoft Graph permission with the same name.Then delete stored passwords and app passwords from code, config, scheduled tasks and credential stores, and run every job, upload and refresh end to end, scheduled runs included.