# How do I access address or date of birth?

**URL:** <https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052>\
**Category:** Get Help\
**Tags:** actions, users, login, auth0\
**Created:** [June 13, 2022, 8:27pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052 "2022-06-13T20:27:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![monhelle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/monhelle/32/26690_2.png) [@monhelle](https://community.auth0.com/u/monhelle)\
**Post date:** [June 13, 2022, 8:27pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/1 "2022-06-13T20:27:09Z")

</div>

Hey

I am getting my users to log in with BankID, and a lot of information is sent to Auth0. I am using actions create custom accounts in stripe when the users are logging into my application. Stripe is requesting address and date of birth, which I see that I have under "user management \> user \> userdata. However when I use event.user.address or event.user.street\_address, or event.user.dateofbirth, it doesnt appear. No other suggested alternative appears either. I have found out that it should be accessed in users\_metadata, but under “user management \> user \> userdata”, there is nothing there. I have made sure I am syncing the user on each log in. Is there another way other than user\_metadata where I can access streetaddress and date of birth/birthdate? If no, how can I make sure the user\_metadata is populated. I am using Flutter as frontend.

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 13, 2022, 10:15pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/3 "2022-06-13T22:15:17Z")

</div>

Hi @monhelle ,

Thank you for posting this topic on the Auth0 Community!

`Stripe is requesting address and date of birth, which I see that I have under "user management > user > userdata`

Usually, the user’s PII data or address data are stored in the user-metadata field. [This](https://auth0.com/docs/manage-users/user-accounts/metadata/manage-metadata-api#create-user-metadata) article explains how to manage user-metadata with the Management API.

To access details under user\_metadata in Action, we can use the `event.user.user_metadata.street_address` and `event.user.user_metadata.dataofbirth` parameters.

`Stripe is requesting address and date of birth, which I see that I have under "user management > user > userdata`

Could you provide additional contexts, such as a screenshot of where we can see the userdata field, address, and date of birth?

Thanks!

---

<div class="post-metadata">

**Author:** ![monhelle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/monhelle/32/26690_2.png) [@monhelle](https://community.auth0.com/u/monhelle)\
**Post date:** [June 14, 2022, 5:22pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/4 "2022-06-14T17:22:15Z")

</div>

![image](https://global.discourse-cdn.com/auth0/original/3X/0/2/02c26c6af2faa88b17d1576e0388131d38ba4bb2.png)  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/8/5/85267fd26c1d10050d20ae16d0e1bd5de89d4071.png)

---

<div class="post-metadata">

**Author:** ![monhelle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/monhelle/32/26690_2.png) [@monhelle](https://community.auth0.com/u/monhelle)\
**Post date:** [June 14, 2022, 5:33pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/5 "2022-06-14T17:33:50Z")

</div>

It was under “Identity Provider Attributes” @lihua.zhang

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 15, 2022, 7:13pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/7 "2022-06-15T19:13:14Z")

</div>

Hi @monhelle ,

Thank you for providing additional context.

I understand that you want to update the custom identity provider attributes in Action. Actually, such attributes can not be accessed in Action as per the current design but should be accessible in Rules.

The caveat is that rule will be deprecated at some point and our product team has not released the ETA regarding when this feature will be supported in Action yet. Therefore, I suggest you save the dateofbirth and address info in the user\_metadata as an alternative.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![monhelle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/monhelle/32/26690_2.png) [@monhelle](https://community.auth0.com/u/monhelle)\
**Post date:** [June 22, 2022, 7:34pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/8 "2022-06-22T19:34:40Z")

</div>

@lihua.zhang Thanks for your reply, it did. However, when I try to save it in the user\_metadata, then  
I get a 404 not found for the body, i.e the meta\_data

```auto
sendMetaData(String criiptoId, String accessToken, String birthDate) async {
    final url = Uri.https(
      AUTH0_DOMAIN,
      '/api/v2/users/' + criiptoId + '/',
    );

```

```
var body = jsonEncode({
  'user_metadata': {'birthdate': birthDate}
});

  final response = await http.patch(
    url,
    headers: {
      'Authorization': 'Bearer $accessToken',
      'content-type': "application/json"
    },
    body: body,
  );

```

}

Metadata output:  
**{“user\_metadata”:{“birthdate”:“1990-06-25”}}**

Response.body output:  
**flutter: sendMetaData body {“statusCode”:404,“error”:“Not Found”,“message”:“Not Found”}**

Do you know why it says “not found” for the body?

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 22, 2022, 11:10pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/9 "2022-06-22T23:10:43Z")

</div>

Hi @monhelle,

Thank you for the updates.

In your scripts, The `accessToken` and `birthDate` are passed to the function as a String type of parameters. When calling them, you used `$accessToken` and `birthDate`.

Could you please replace  
`'Authorization': 'Bearer $accessToken'`  
with  
`'Authorization': 'Bearer' + accessToken`

Please keep me updated on how it goes. Thanks!

---

<div class="post-metadata">

**Author:** ![monhelle](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/monhelle/32/26690_2.png) [@monhelle](https://community.auth0.com/u/monhelle)\
**Post date:** [June 24, 2022, 1:48pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/10 "2022-06-24T13:48:35Z")

</div>

Hello! Thanks for your reply @lihua.zhang . I did what you asked but it didnt do anything to solve the problem unfortunately. Any other ideas?

```auto

flutter: metadata {"user_metadata":{"birthdate":"1990-06-25"}}**

flutter: sendMetaData 404**

flutter: sendMetaData body {"statusCode":404,"error":"Not Found","message":"Not Found"}**

```

---

<div class="post-metadata">

**Author:** ![lihua.zhang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lihua.zhang/32/39683_2.png) [@lihua.zhang](https://community.auth0.com/u/lihua.zhang)\
**Post date:** [June 27, 2022, 3:00pm UTC](https://community.auth0.com/t/how-do-i-access-address-or-date-of-birth/85052/11 "2022-06-27T15:00:07Z")

</div>

This topic was automatically closed after 11 days. New replies are no longer allowed.
