Skip to content

RKSAD0004

Why this is deprecated

Microsoft.IdentityModel.Clients.ActiveDirectory.UserPasswordCredential is part of the Rokstep.IdentityModel.Clients.ActiveDirectory.Shims shim library. The original library is abandoned or deprecated. This diagnostic ID (RKSAD0004) fires at build time to guide you toward the modern replacement.

Obsolete message: Microsoft.IdentityModel.Clients.ActiveDirectory.UserPasswordCredential is from the deprecated ADAL library. Resource-owner password credentials (ROPC) is a v1 OAuth2 flow that bypasses MFA and conditional access. This Rokstep shim keeps your existing code working on .NET 6/8 by delegating to MSAL’s AcquireTokenByUsernamePassword, but new code should use an interactive flow instead. See https://dev.rokstep.eu/migrations/RKSAD0004 for migration guidance.

What you can do

Option 1 — Drop-in shim (zero code changes)

Install the shim package and keep using the existing API. The shim compiles your code but emits this warning at build time.

Terminal window
dotnet add package Rokstep.IdentityModel.Clients.ActiveDirectory.Shims

Option 2 — Migrate to the modern alternative

Replace Microsoft.IdentityModel.Clients.ActiveDirectory.UserPasswordCredential with from.

Type details

While you’re at it

Check the Hardened Migration Security Checklist for common security issues to fix during migration.


Not your kind of work? Let me do it for you. Found a typo? Email me — solo founder, no public issue tracker for this site.