Most Windows developers have never touched the prompt options in the Data Protection API. That is exactly why this one can hurt. If some old internal tool of yours does, and the person who wrote it left years ago, the data it protected becomes unreadable on a date Microsoft cannot seem to agree with itself about.

The October 28 preview updates for Windows 11 add a warning before prompt-based protect and unprotect operations. Microsoft's release notes for KB5127936 (builds 26300.9818 and 26200.9818, for 25H2 and 26H2) and KB5127653 (26H1) say that this prompt-based experience will be retired in April 2027. The same warning appears in Insider build 28120.3393, which Microsoft shipped on October 30 for the Experimental 26H1 channel.

Two dates, one deadline

The catch, and the reason to read the docs and not only the update notes: Microsoft's own API reference pages for CryptProtectData and CryptUnprotectData carry an important note that says the prompt-based flow, controlled by the pPromptStruct parameter, is deprecated and "will be removed in February 2027." Japanese site Tech Innovate IT pointed out the mismatch: the update notes say April, the reference docs say February.

I can't tell you which one is right. Neither can anyone outside Microsoft. My advice is boring and safe: treat February 2027 as your deadline. If Microsoft turns out to mean April, you gain two months. If it means February and you planned for April, you lose production data.

What the two sources agree on matters more than where they disagree. Only the prompt-based path is going away. Standard DPAPI calls that do not use prompts keep working as before, according to Microsoft's update notes as relayed by Windows Report and Neowin.

What the prompt path actually is

DPAPI is the Windows mechanism behind CryptProtectData and CryptUnprotectData. Normally you hand it some bytes, and it encrypts them under the current user's credentials, with nothing to ask the user. There is an optional pPromptStruct parameter on both functions, a pointer to a CRYPTPROTECT_PROMPTSTRUCT, that tells Windows when and where to show a prompt and what it should say.

A third-party analysis from Passcape, which documents how DPAPI works, notes that this prompt option has always been used very infrequently because the dialog is interactive. That likely explains why Microsoft is comfortable removing it.

The docs spell out what happens next:

  • Passing NULL for pPromptStruct, or a struct whose dwPromptFlags is set to 0, uses the non-interactive path for new operations.
  • Operations on data originally protected with the prompt flow will fail once the prompt path is removed.
  • On the decrypt side, CryptUnprotectData has the same note, so decrypting is not a way around it later.

The second bullet is the dangerous one. You cannot simply stop passing the prompt struct on the day the deadline passes. Anything that was written with the prompt flow needs to be read while you still can and written back out the other way.

Step 1: find out whether you use it

Search your source, scripts and any vendored code for the struct and its field. In a Windows terminal, from your repo root:

CodeCopy 

findstr /s /i /n "CRYPTPROTECT_PROMPTSTRUCT dwPromptFlags" *.c *.cpp *.h *.cs

Or in PowerShell:

CodeCopy 

Get-ChildItem -Recurse -Include .c,.cpp,.h,.cs | Select-String -Pattern "CRYPTPROTECT_PROMPTSTRUCT|dwPromptFlags"

A hit does not automatically mean you are in trouble. Plenty of code declares the struct and sets dwPromptFlags to 0 or passes NULL. Read each call site. You are looking for a struct whose dwPromptFlags is non-zero, which means the code asks Windows to show a prompt.

Compiled third-party binaries are harder. The Insider builds and the October preview updates show the new warning when a prompt-based operation runs, so one cheap test is to run the suspect application on a machine with KB5127936 installed and see whether the warning appears. That is a test I would run on a spare machine, not on production.

Step 2: migrate the data

Microsoft's guidance, as phrased in the release notes, has three parts. Stop creating new prompt-protected data. Use a supported non-interactive protection flow. Decrypt or migrate existing data before the retirement date.

In practice that means a one-time job per store:

  1. While the prompt flow still works, read each protected blob and decrypt it.
  2. Re-protect the plaintext with pPromptStruct set to NULL, or with a struct whose dwPromptFlags is 0.
  3. Write the new blob back to the same location and verify it round-trips.
  4. Keep a tested backup of the old blobs until you are sure nothing reads them any more.

If the prompt existed to add a user-chosen secret, you need a replacement for that extra factor. Microsoft's notes point you to non-interactive protection but do not name one. Whether you move to a key you manage yourself, an OS credential store or something else depends on your threat model, and I would rather you pick deliberately than copy a snippet.

Step 3: add a test that fails loudly

Add a unit test that calls your protect and unprotect wrappers with a NULL prompt struct and confirms a round trip. Run it on a build with the new warning. The aim is not to test Windows, it is to make sure no refactor reintroduces a prompt flag. A static analysis rule that fails the build on a non-zero dwPromptFlags is cheap insurance against a bad February.

The rest of build 28120.3393

The DPAPI change is the one with a deadline, but the same Insider build carries a few smaller items, all taken from Microsoft's changelog as reproduced by Neowin and Winaero:

  • A rebuilt AutoPlay dialog, using WinUI, with dark mode support and better response to text scaling and display settings. Its notifications now dock in the notification center.
  • File Explorer Home loads faster, the Featured carousel scrolls by touch, and the table view shows file sizes in KB, MB or GB instead of KB only. Middle-clicking a folder in the address bar or Home page opens it in a new tab.
  • A refreshed Gaming Task View in Xbox mode, with a navigation bar that offers Exit to Desktop and power options.
  • Microsoft has temporarily put back the old loading indicator for boot, sign-in, restart, shutdown and update screens while it fixes a bug with the new one.

If you are more interested in the stable-channel side of the same update, our earlier piece on KB5127936's right-click menu and Cloud rebuild changes covers it.

Windows 11 desktop showing the Start menu and the Settings About page

Expand

Windows 11 desktop showing the Start menu and the Settings About page

Image: Microsoft; for the icons: notepad-plus-plus.org and Mozilla, via Wikimedia Commons, Public domain

Who should worry, and who should not

Worry if you maintain line-of-business software that stores credentials or tokens locally, a password manager plugin, an installer that protects configuration, or anything old enough that nobody remembers how it handles secrets. Worry if your code base includes a vendor DLL you cannot read.

Do not worry if you only use DPAPI through a high-level wrapper that passes no prompt. Most apps fall here. Microsoft says standard DPAPI operations without prompts continue to function without change.

We haven't run this ourselves: the Windows 11 builds are previews, and the steps above rest on Microsoft's reference pages for CryptProtectData and CryptUnprotectData, the October 28 release notes, and coverage from Neowin, Winaero and Windows Report.

Dell XPS 15 laptop and a Microsoft Surface Pro on a wooden table, one of them showing a video call

Expand

Dell XPS 15 laptop and a Microsoft Surface Pro on a wooden table, one of them showing a video call

Image: Tom Page via Wikimedia Commons, CC BY-SA 2.0

Hero image: KKPCW via Wikimedia Commons, CC BY-SA 4.0

Originally published on Mango Developer.