From what I understand, there is no direct way to get the value using WebSecurity helper.
When creating a user and an account, the method returns a confirmation token:
string confirmationToken = WebSecurity.CreateUserAndAccount("tester", "test123", requireConfirmationToken: true);
Then you send this token (inside the link as a QueryString parameter, for example) to the user's email address. When the user clicks on the link, your application should receive / read this token, and then you should call:
WebSecurity.ConfirmAccount(userName, confirmationToken);
As you already mentioned, you can of course get into db directly by writing your own SQL, or even add webpages_Membership to the EntityFramewok EDMX model and query the table directly:
var confirmationToken = Database.Memberships.Single(m => m.UserId == userId).ConfirmationToken;
More on this:
Using ASP.NET Web Security
Get confirmation of subscription confirmation?
source share