<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00007tBZkgSAGOkta Classic EngineLifecycle ManagementAnswered2024-03-25T15:07:46.000Z2020-02-22T04:23:58.000Z2020-12-31T15:45:10.000Z

PritiS.45592 (Customer) asked a question.

Resend Activation Email OnBoarding

We have bulk users who will be onbaorded on a particular day.

I wanted to find a way where they can get an activation email on their email.

How can we do this in Okta?

I understand an admin can click "Resend Activation Email" from the console to do this. Is there an Okta API to trigger "Resend Activation Email"? Please direct me to the same.

Thanks!


  • sandeepk.84743 (Wipro Technologies)

    Hi Priti,

     

    what you can do is, Get the list of users from the list users API. once you get the list, Loop through that list & call the {{url}}/api/v1/users/{{userId}}/lifecycle/activate?sendEmail=true

     

    Replace the userId each time in the for loop. Let me know if you need the full Java code. I have the code handy.

    Expand Post
    • vl2uz (vl2uz)

      Hi Sandeep, I know it's been a few months but I would be interested in the Java code.

  • WillG.71031 (Customer)

    @sandeepk.84743 (Wipro Technologies)​ This doesn't work either. If the user has previously been activated and you call activate you get an error saying "Activation failed because the user is already active". If you call reactivate you get a new activationToken and a new activationUrl, but no email is sent to the user.

     

    @PritiS.45592 (Customer)​ Did you ever find a way to resend the activation email? We have this requirement. If we create a new user and activate them an email gets sent. If that email gets caught by spam filters or otherwise gets lost or deleted we need a way to resend it. How can we do that through the API?

     

    Expand Post
  • To bulk resend activation emails for users who are "pending user action", the following API can be used.

     

    {{url}}/api/v1/users/{{userID}}/lifecycle/reactivate?sendEmail=true

     

    This can be used within Postman Runner with a filtered CSV list (easily obtained using Rockstar - Chrome plugin).

    Expand Post
  • KenB.22814 (Customer)

    Thanks @brooks.johnson1.5389696669435503E12 (Okta, Inc.)​, very useful!!

     

    For those that need it here is C# code using the SDK API wrapper

     

        private async Task PostLifecycleReactivate(OktaClient client, IUser user)

        {

          await client.PostAsync(new HttpRequest

          {

            Uri = "/api/v1/users/{userId}/lifecycle/reactivate",

            PathParameters = new Dictionary<string, object>()

            {

              ["userId"] = user.Id,

            },

            QueryParameters = new Dictionary<string, object>()

            {

              ["sendEmail"] = true,

            }

          });

        }

    Expand Post
This question is closed.
Loading
Resend Activation Email OnBoarding