PublicClientApplication.AcquireTokenByUsernamePasswordAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Use AcquireTokenByUsernamePassword instead. See https://aka.ms/msal-net-3-breaking-changes.
Non-interactive request to acquire a security token from the authority, via Username/Password Authentication. Available only on .net desktop and .net core. See https://aka.ms/msal-net-up for details.
[System.Obsolete("Use AcquireTokenByUsernamePassword instead. See https://aka.ms/msal-net-3-breaking-changes. ", true)]
public System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult> AcquireTokenByUsernamePasswordAsync (System.Collections.Generic.IEnumerable<string> scopes, string username, System.Security.SecureString securePassword);
[<System.Obsolete("Use AcquireTokenByUsernamePassword instead. See https://aka.ms/msal-net-3-breaking-changes. ", true)>]
abstract member AcquireTokenByUsernamePasswordAsync : seq<string> * string * System.Security.SecureString -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
override this.AcquireTokenByUsernamePasswordAsync : seq<string> * string * System.Security.SecureString -> System.Threading.Tasks.Task<Microsoft.Identity.Client.AuthenticationResult>
Public Function AcquireTokenByUsernamePasswordAsync (scopes As IEnumerable(Of String), username As String, securePassword As SecureString) As Task(Of AuthenticationResult)
Parameters
- scopes
- IEnumerable<String>
Scopes requested to access a protected API
- username
- String
Identifier of the user application requests token on behalf. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com
- securePassword
- SecureString
User password.
Returns
Authentication result containing a token for the requested scopes and account
Implements
- Attributes
Applies to
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示