# Google Auth Issue when Logging on

**URL:** <https://community.f5.com/t/google-auth-issue-when-logging-on/17895>\
**Category:** Technical Forums\
**Tags:** big-ip, big-ip-access-policy-manager-apm, security\
**Created:** [July 23, 2018, 2:48pm UTC](https://community.f5.com/t/google-auth-issue-when-logging-on/17895 "2018-07-23T14:48:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony\_iervolino](https://avatars.discourse-cdn.com/v4/letter/t/0ea827/32.png) [@tony\_iervolino](https://community.f5.com/u/tony_iervolino)\
**Post date:** [July 23, 2018, 2:48pm UTC](https://community.f5.com/t/google-auth-issue-when-logging-on/17895/1 "2018-07-23T14:48:41Z")

</div>

I’m having an issue when logging into an APM Page with Google Auth.

In the GA\_code\_verify the logon name is returning an error message

When logging to an APM we normally use ACCESS::session data get session.logon.last.username But because we registered our Google codes with [firstname.lastname@domain.ca](mailto:firstname.lastname@domain.ca) we changed the ga code to use our e-mail address instead of our split domain session.last.username but we want to use set username [ACCESS::session data get session.logon.last.email]

It returns this error message which pulls the : AD module: query with ‘(sAMAccountName=MyLastname)’ failed: Preauthentication failed, principal name: [MyLastname@domain.PRI](mailto:MyLastname@domain.PRI). Invalid user credentials. Our user Principal name is set to [firstname.lastname@domain.ca](mailto:firstname.lastname@domain.ca) We use a split domain between our external and our internal.

Irule GA code is set to look for user principal name but still returns the error message above where it’s using my sAMAccountName=MyLastname

How do we get it to use [firstname.lastname@domain.ca](mailto:firstname.lastname@domain.ca), how our GEsecurity is set?

```tcl
set variables from APM logon page
    set username [ACCESS::session data get session.logon.last.email]
    set ga_code_attempt [ACCESS::session data get session.logon.last.$static::ga_code_form_field]

```
