AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Registers a callback handler for scenarios where credentials need to be supplied during user authentication (primarily the non-domain-joined use case). Custom data, which will be supplied in the CredentialRequestCallbackArgs instance passed to the callback, can also be supplied.

The callback will only be invoked if the underlying SAML role profile indicates it was set up for use with a specific identity. For profiles that do not contain any user identity the SDK will default to using the identity of the current process during authentication. Additionally, if the profile contain user identity information but no callback has been registered, the SDK will also attempt to use the current process identity during authentication.

Namespace: Amazon.Runtime
Assembly: AWSSDK.Core.dll
Version: 3.x.y.z


public void SetCredentialCallbackData(
         StoredProfileFederatedCredentials.RequestUserCredential callback,
         Object customData
Type: Amazon.Runtime.StoredProfileFederatedCredentials.RequestUserCredential

The handler to be called

Type: System.Object

Custom state data to be supplied in the arguments to the callback.


Only one callback handler can be registered. The call to the handler will be made on whatever thread is executing at the time a demand to provide AWS credentials is made. If the handler code requires that UI need to be displayed, the handler should transition to the UI thread as appropriate.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5