# RelayState Parameter Value for F5 (as IDP) initiated connection to Google Apps/Mail

**URL:** <https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747>\
**Category:** Technical Forums\
**Tags:** big-ip, big-ip-access-policy-manager-apm, saml, cloud, application-delivery, google\
**Created:** [September 28, 2017, 4:51am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747 "2017-09-28T04:51:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohit\_Singla\_17](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Rohit\_Singla\_17](https://community.f5.com/u/Rohit_Singla_17)\
**Post date:** [September 28, 2017, 4:51am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/1 "2017-09-28T04:51:53Z")

</div>

Hello Experts,

I am trying to create a SAML SSO. Below are the details

F5 is acting as IDP Google GSuite is acting as SP (we intent to use gmail, drive etc from google with Auth by F5 APM) When I try IDP initiated connection, i.e. Click on the SAML SSO link published in Webtop, I am getting an error from google, which says “The required response parameter RelayState was missing” I have not configured any relaystate parameter in F5 under SAML SP Connector configuration. (rather i dont know what to configure) I tried to search a lot but not getting a definitive working parameter to be used as relay state.

Anyone got that working, please let me know how we can get this working or what relay state parameter shall i use when using F5 as IDP and google as SP, and the connection is IDP initiated.

---

<div class="post-metadata">

**Author:** ![\_swo0sh\_gt\_3084](https://avatars.discourse-cdn.com/v4/letter/_/dec6dc/32.png) [@\_swo0sh\_gt\_3084](https://community.f5.com/u/_swo0sh_gt_3084)\
**Post date:** [September 28, 2017, 5:18am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/2 "2017-09-28T05:18:50Z")

</div>

Have you already checked the Deployment guide? [https://www.f5.com/pdf/deployment-guides/saml-idp-saas-dg.pdf](https://www.f5.com/pdf/deployment-guides/saml-idp-saas-dg.pdf)

---

<div class="post-metadata">

**Author:** ![Rohit\_Singla\_17](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Rohit\_Singla\_17](https://community.f5.com/u/Rohit_Singla_17)\
**Post date:** [September 28, 2017, 5:37am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/3 "2017-09-28T05:37:57Z")

</div>

No Man, this guide is good, but relay state information is missing, I tried few stuff, but didnt work. looking for exact information for relay state for google apps/ google mail when gsuite is SP. this guide says, relaystate as none 🙂

---

<div class="post-metadata">

**Author:** ![KeesvandenBos](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@KeesvandenBos](https://community.f5.com/u/KeesvandenBos)\
**Post date:** [November 24, 2017, 7:14am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/4 "2017-11-24T07:14:35Z")

</div>

have a look at this devcentral [post](https://devcentral.f5.com/s/feed/0D51T00006i7fFTSAY)

¬†

Cheers,

¬†

Kees

¬†

---

<div class="post-metadata">

**Author:** ![Rohit\_Singla\_17](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Rohit\_Singla\_17](https://community.f5.com/u/Rohit_Singla_17)\
**Post date:** [March 11, 2018, 3:58am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/5 "2018-03-11T03:58:20Z")

</div>

Yes, one of my colleague helped me with this and this relay state works

[https://www.google.com/a/uti.aucegypt.edu/ServiceLogin](https://www.google.com/a/uti.aucegypt.edu/ServiceLogin)\?service=mail&passive=true&rm=false&continue=https%3A%2F%[2Fmail.google.com](http://2Fmail.google.com)%2Fmail%2F&ss=1&ltmpl=default&ltmplcache=2&emr=1&osid=1

its Very sad that, none of the F5 or the google documents have this mentioned…

---

<div class="post-metadata">

**Author:** ![JayRob\_328285](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JayRob\_328285](https://community.f5.com/u/JayRob_328285)\
**Post date:** [March 11, 2018, 4:02am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/6 "2018-03-11T04:02:56Z")

</div>

Can you let me know how you added this to the relay state ? Possibly share the irule sanitized of course?

Thanks so much for your comment on this.

This will really help me I have been banging my head for weeks trying to figure this out.

I have tried the layered VS approach and tried to append relay state as a header, I have tried to use a stream profile and re-write the payload, but I am still having difficulties.

---

<div class="post-metadata">

**Author:** ![Rohit\_Singla\_17](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Rohit\_Singla\_17](https://community.f5.com/u/Rohit_Singla_17)\
**Post date:** [March 11, 2018, 4:24am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/7 "2018-03-11T04:24:36Z")

</div>

I added this in APM config, Relay State, not under iRule. Let me know if any questions

Like here in this image

 ![image_53376.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/a/4/a4593e9a18a0da7e41b7bc87592cba924ec47cf5.png)

---

<div class="post-metadata">

**Author:** ![JayRob\_328285](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JayRob\_328285](https://community.f5.com/u/JayRob_328285)\
**Post date:** [March 11, 2018, 4:29am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/8 "2018-03-11T04:29:28Z")

</div>

Thanks again for your comments to start the session to have to go to a specific URL ?

Or can I just go to [accounts.google.com](http://accounts.google.com) ?

---

<div class="post-metadata">

**Author:** ![Rohit\_Singla\_17](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Rohit\_Singla\_17](https://community.f5.com/u/Rohit_Singla_17)\
**Post date:** [March 11, 2018, 5:02am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/9 "2018-03-11T05:02:13Z")

</div>

It will be SP initiated, for e.g. Just go to [Mail.google.com](http://Mail.google.com) and then it will take you to APM policy

On the APM policy Virtual Server, we added the below irule to make the seamless opening of GMAIL, The location in this irule is the SAML resource for the GSUITE.

ltm rule /Common/Auto-Launch { when ACCESS\_POLICY\_COMPLETED { ACCESS::respond 302 Location “/saml/idp/res?id=/Common/idp.uti.app/idp.uti\_UTI\_saml\_resource\_sso” } when ACCESS\_ACL\_ALLOWED { ACCESS::respond 302 Location “/saml/idp/res?id=/Common/idp.uti.app/idp.uti\_UTI\_saml\_resource\_sso” }

---

<div class="post-metadata">

**Author:** ![Rohit\_Singla\_17](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Rohit\_Singla\_17](https://community.f5.com/u/Rohit_Singla_17)\
**Post date:** [March 11, 2018, 6:00am UTC](https://community.f5.com/t/relaystate-parameter-value-for-f5-as-idp-initiated-connection-to-google-apps-mail/8747/10 "2018-03-11T06:00:15Z")

</div>

great excellent to hear this.. Do mark my post as answer if you are satisfied with the answer 😉
