# Auto-populate a field with an attribute from an IdP

**URL:** <https://community.gravityforms.com/t/auto-populate-a-field-with-an-attribute-from-an-idp/15166>\
**Category:** Get Help\
**Tags:** gform\_field\_value, authentication, shibboleth-idp, idp\
**Created:** [May 17, 2023, 6:43pm UTC](https://community.gravityforms.com/t/auto-populate-a-field-with-an-attribute-from-an-idp/15166 "2023-05-17T18:43:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user6115989a173fb367](https://avatars.discourse-cdn.com/v4/letter/u/958977/32.png) [@user6115989a173fb367](https://community.gravityforms.com/u/user6115989a173fb367)\
**Post date:** [May 17, 2023, 6:43pm UTC](https://community.gravityforms.com/t/auto-populate-a-field-with-an-attribute-from-an-idp/15166/1 "2023-05-17T18:43:08Z")

</div>

Hi all,  
I have a form that’s behind authentication to a Shibboleth IdP - every visit to the form has a login session behind it, and that session contains a user ID attribute (“uid”) that I could presumably pull into my form. I’m not quite sure how to do that, however.  
I’ve confirmed with our IdP admins that the “uid” attribute is released and available to me, and I’ve read the GF documentation that seems relevant – merge tags appear to be at least part of the answer. However, those appear to be ready out of the box for logged-in users who came in via _Wordpress_ authentication, which isn’t relevant to me.  
What’s the missing piece(s) of the puzzle here – how/where do I connect the dots and map my attribute from the IdP to a field in Gravity Forms?  
Thanks for any guidance.

---

<div class="post-metadata">

**Author:** ![user6115989a173fb367](https://avatars.discourse-cdn.com/v4/letter/u/958977/32.png) [@user6115989a173fb367](https://community.gravityforms.com/u/user6115989a173fb367)\
**Post date:** [May 25, 2023, 9:20pm UTC](https://community.gravityforms.com/t/auto-populate-a-field-with-an-attribute-from-an-idp/15166/2 "2023-05-25T21:20:10Z")

</div>

Anybody?

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [June 1, 2023, 12:51pm UTC](https://community.gravityforms.com/t/auto-populate-a-field-with-an-attribute-from-an-idp/15166/3 "2023-06-01T12:51:21Z")

</div>

Hi Jeff. Where is the UID available to you in the session?

> that session contains a user ID attribute (“uid”) that I could presumably pull into my form.  
> I’ve confirmed with our IdP admins that the “uid” attribute is released and available to me

If you can explain how to get that using PHP, we can help you populate a field in the form with it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [July 1, 2023, 12:51pm UTC](https://community.gravityforms.com/t/auto-populate-a-field-with-an-attribute-from-an-idp/15166/4 "2023-07-01T12:51:48Z")

</div>

Closed on July 1, 2023, 12:51pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
