BestPaid guides · Microsoft 365 · SharePoint Online
SharePoint app-only code stopped working? Azure ACS was retired on April 2, 2026. Move it to Microsoft Entra ID and Sites.Selected
Scripts, services and integrations that sign in to SharePoint Online with a client ID and secret from AppRegNew.aspx, with permissions granted in AppInv.aspx, stopped working when Microsoft retired Azure ACS. There's no extension and no in-place upgrade: each one needs a new Microsoft Entra ID app.
What was retired
- Azure ACS stopped working for new tenants on November 1, 2024, and for existing tenants on April 2, 2026, when it was fully retired.
- The SharePoint Add-in model in SharePoint Online was retired on the same date. SharePoint Framework (SPFx) replaces add-in user interfaces inside SharePoint.
- Code that gets its token from ACS, for example PnP's
GetACSAppOnlyContext or older TokenHelper code, no longer works.
- ACS principals can show up in Microsoft Entra ID: since December 2024, ones created in
AppRegNew.aspx appear as regular Entra application principals. Microsoft's FAQ says this didn't convert them to supported Microsoft Entra authentication, and renewing their secrets doesn't restore ACS after April 2, 2026. You register a new app.
1. Register an Entra ID app for each integration
- Use a certificate. Microsoft documents app-only access to SharePoint with a certificate; a client secret works for Microsoft Graph but not for SharePoint's own REST and CSOM APIs in app-only mode.
- Ask for Sites.Selected instead of
Sites.FullControl.All: the app then reaches only the sites you grant it. Sites.Selected exists under both SharePoint and Microsoft Graph, so pick the one your code calls: SharePoint's for CSOM and SharePoint REST (like the PnP Framework sample below), Microsoft Graph's for Graph code, or both.
- An admin grants consent, then grants the app access to each site, through Microsoft Graph (
POST /sites/{site-id}/permissions) or PnP PowerShell (Grant-PnPEntraIDAppSitePermission; older versions call it Grant-PnPAzureADAppSitePermission).
2. Change how the code signs in
With PnP Framework and CSOM, the change is often only the sign-in:
// before (ACS, no longer works)
// using var ctx = new AuthenticationManager().GetACSAppOnlyContext(siteUrl, clientId, clientSecret);
// after (Entra ID app with a certificate)
var auth = new PnP.Framework.AuthenticationManager(clientId, certificate, "contoso.onmicrosoft.com");
using var ctx = await auth.GetContextAsync(siteUrl);
ctx.Load(ctx.Web, w => w.Title);
await ctx.ExecuteQueryAsync();
Code that only reads and writes files and list items can also move to Microsoft Graph. It then needs the Microsoft Graph Sites.Selected permission; the site grants themselves apply to both Graph and SharePoint's own APIs.
3. Don't forget the less visible ones
- Scheduled PowerShell scripts that connect with
-ClientId and -ClientSecret against SharePoint.
- Third-party tools (backup, migration, sync) set up years ago with an ACS client ID: ask the vendor for its Entra ID setup.
- Provider-hosted add-ins: Microsoft's guidance is to rewrite them as externally hosted apps (on Azure, for example, and optionally also offered as Teams apps) that use Microsoft Entra ID for authentication, and to use SPFx for any part that has to appear inside SharePoint, calling the app's API from there.
Something stopped on April 2 and nobody knows how it was built? We move SharePoint add-ins and ACS-based integrations to Microsoft Entra ID, Sites.Selected and Microsoft Graph at a fixed price: a script or scheduled job from $690, an app or service from $1,490. One app gets a free estimate within 2 business days. We never ask for passwords, secrets or admin access: your admin registers the app and grants consent.
See the Microsoft 365 migration offer