From 24431126a8d3a7d56813dae54b7f8fbd8ee72071 Mon Sep 17 00:00:00 2001 From: Neha Bhargava Date: Wed, 23 Oct 2024 15:07:36 -0700 Subject: [PATCH 1/2] Unobsolete GetAccountsAsync --- .../Microsoft.Identity.Client/IConfidentialClientApplication.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/client/Microsoft.Identity.Client/IConfidentialClientApplication.cs b/src/client/Microsoft.Identity.Client/IConfidentialClientApplication.cs index 90f6e7791d..709d6ca17e 100644 --- a/src/client/Microsoft.Identity.Client/IConfidentialClientApplication.cs +++ b/src/client/Microsoft.Identity.Client/IConfidentialClientApplication.cs @@ -96,8 +96,6 @@ AcquireTokenByAuthorizationCodeParameterBuilder AcquireTokenByAuthorizationCode( /// /// Use in web apps and web APIs, and use a token cache serializer for better security and performance. See https://aka.ms/msal-net-cca-token-cache-serialization. /// - [Obsolete("Use GetAccountAsync(identifier) in web apps and web APIs, and use a token cache serializer for better security and performance. See https://aka.ms/msal-net-cca-token-cache-serialization.")] - [EditorBrowsable(EditorBrowsableState.Never)] new Task> GetAccountsAsync(); } } From 75356ca19f569e7718a7c9508fdde555ff5f46da Mon Sep 17 00:00:00 2001 From: Neha Bhargava Date: Mon, 28 Oct 2024 15:04:31 -0700 Subject: [PATCH 2/2] Add comment to use GetAccounts only for ROPC --- .../Microsoft.Identity.Client/IConfidentialClientApplication.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/Microsoft.Identity.Client/IConfidentialClientApplication.cs b/src/client/Microsoft.Identity.Client/IConfidentialClientApplication.cs index 709d6ca17e..7ad35fd683 100644 --- a/src/client/Microsoft.Identity.Client/IConfidentialClientApplication.cs +++ b/src/client/Microsoft.Identity.Client/IConfidentialClientApplication.cs @@ -94,6 +94,7 @@ AcquireTokenByAuthorizationCodeParameterBuilder AcquireTokenByAuthorizationCode( new AcquireTokenSilentParameterBuilder AcquireTokenSilent(IEnumerable scopes, string loginHint); /// + /// This method is strictly to be used with ROPC flow in test environments. It is not recommended to use ROPC in production applications. /// Use in web apps and web APIs, and use a token cache serializer for better security and performance. See https://aka.ms/msal-net-cca-token-cache-serialization. /// new Task> GetAccountsAsync();