Amazon.IdentityStore CreateUser Not Sending Email Verification Link #3288
-
Describe the bugWhen creating a user with the Amazon.IdentityStore API the user does not receive the email verification, we have to go in and manually send it. Not really seeing the point of this API if the end user cannot verify to login. I have also tried enabling Send email OTP just to see if it works and it does not. Only way for the user to get the email is by clicking the button in the IAM Identity Center console. Expected BehaviorCreate user via API, email is sent to user so they can login. Current BehaviorCreate User via API, no email is sent to the user. Reproduction StepsCODE SAMPLE
Possible SolutionNo response Additional Information/ContextNo response AWS .NET SDK and/or Package version usedAWSSDK.IdentityStore 3.7.300.68 Targeted .NET Platformnet452 Operating System and versionWindows |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
@feardobeardo2 Good afternoon. Thanks for reporting the issue. This appears to be reproducible using code below: using Amazon;
using Amazon.IdentityStore;
using Amazon.IdentityStore.Model;
var response = await CreateIdentityStoreUser("d-<<some-id>>", RegionEndpoint.USEast1, "[email protected]", "Test User", "Test", "User");
Console.WriteLine(response.UserId);
async Task<CreateUserResponse> CreateIdentityStoreUser(string identityStoreId, RegionEndpoint regionEndpoint, string emailAddress, string displayName, string firstName, string lastName)
{
var identityService = new AmazonIdentityStoreClient(regionEndpoint);
var createUserRequest = new CreateUserRequest
{
IdentityStoreId = identityStoreId,
UserName = emailAddress,
Emails = new List<Email>
{
new Email()
{
Primary = true,
Type = "Work",
Value = emailAddress
}
},
DisplayName = displayName,
Name = new Name()
{
FamilyName = lastName,
GivenName = firstName
}
};
return await identityService.CreateUserAsync(createUserRequest);
} After user is successfully created, examining user details in AWS console displays below banner at the top:
There doesn't appear to be any service API operation per Identity Store API Reference to send email verification link to user. Upon investigating further (thanks for article Add a layer of security for AWS IAM Identity Center user portal sign-in with context-aware email-based verification), here are the additional steps required:
So I was able to test the above flow at my end and verified that it works successfully. Hope this helps. Thanks, |
Beta Was this translation helpful? Give feedback.
@feardobeardo2 Good afternoon. Thanks for reporting the issue. This appears to be reproducible using code below: