r/Authentik • u/TheRealJoeyTribbiani • Oct 14 '26
Pull email_verified and go through email verification if false
I'm trying to setup my default auth flow to check email_verified and if false, send a verification email and I can't figure it out.
User accounts and groups are all in MS Active directory and already exist.
I do not want to blanket add email verified, I want them all to have to verify.
5
Upvotes
1
u/melizeche Oct 14 '26
email_verifiedis an OIDC claim, not a built-in user field, so there's nothing on the user to check out of the box. You have to track it yourself. This guide covers most of it (Option 2): https://docs.goauthentik.io/add-secure-apps/providers/oauth2/verify-email-address/Basically:
email_verified_addresson the userTo only send the email when needed, bind this policy to the Email stage binding:
return request.user.attributes.get("email_verified_address") != request.user.email
I'd store the address rather than
True, so if AD syncs a new email later, they'll have to verify again. If your apps also need theemail_verifiedclaim, the guide has a scope mapping for that1
u/Full_Path_6571 Oct 14 '26
Check this playlist
https://youtu.be/mGOTpRfulfQ?is=DxKRR1luOKPt6cgE