ISSOLookup2.GetCredentials Method
The GetCredentials method retrieves the user credentials for an application.
Syntax
HRESULT GetCredentials(
BSTR bstrApplicationName,
LONG lFlags,
BSTR* pbstrExternalUserName,
SAFEARRAY credentials
);
Function GetCredentials(
bstrApplicationName As String,
lFlags As Long,
pbstrExternalUserName As String
)
As String
Parameters
bstrApplicationName
[in] String that specifies the application name. This parameter cannot be NULL, an empty string, or contain spaces. Application names are not case-sensitive, but case will be preserved. For example, ABC, abc, and AbC are considered to be the same application.
bstrApplicationName
[in] String that specifies the application name. This parameter cannot be NULL, an empty string, or contain spaces. Application names not case-sensitive, but case will be preserved. For example, ABC, abc, and AbC are considered to be the same application.
lFlags
[in] Long integer that specifies the flags to set. Using the SSO_FLAG_REFRESH indicates that the credential cache should be bypassed.
lFlags
[in] Long that specifies the flags to set. Using the SSO_FLAG_REFRESH indicates that the credential cache should be bypassed.
pbstrExternalUserName
[out] Pointer to a string that receives the external user name.
pbstrExternalUserName
[out] String that receives the external user name.
credentials
[out] String array that receives the credentials.
Return Value
This method returns an HRESULT indicating whether it completed successfully. For more details, see the Error Values section.
String array that receives the credentials.
Error Values
This method returns an HRESULT containing one of the values in the following table.
This method indicates errors by setting the Number property of the global Err object to one of the values in the following table.
Value | Description |
---|---|
S_OK | The method succeeded. |
E_ACCESSDENIED | Access is denied to the caller. |
E_INVALIDARG | An invalid parameter was detected. |
Remarks
To access this method, you must be an Application User. You can only retrieve your own credential.
Requirements
Platforms: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 11, and Windows 10
See Also
ISSOLookup2 Interface (COM)
ISSOLookup2 Members
Programming with Enterprise Single Sign-On