diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py
--- a/moto/cognitoidp/models.py
+++ b/moto/cognitoidp/models.py
@@ -568,6 +568,9 @@ def add_custom_attributes(self, custom_attributes: List[Dict[str, str]]) -> None
     def create_id_token(self, client_id: str, username: str) -> Tuple[str, int]:
         extra_data = self.get_user_extra_data_by_client_id(client_id, username)
         user = self._get_user(username)
+        for attr in user.attributes:
+            if attr["Name"].startswith("custom:"):
+                extra_data[attr["Name"]] = attr["Value"]
         if len(user.groups) > 0:
             extra_data["cognito:groups"] = [group.group_name for group in user.groups]
         id_token, expires_in = self.create_jwt(

Hi @davidtwomey, welcome to Moto! I'll raise a PR with this feature in a bit.
diff --git a/tests/test_cognitoidp/test_cognitoidp.py b/tests/test_cognitoidp/test_cognitoidp.py
--- a/tests/test_cognitoidp/test_cognitoidp.py
+++ b/tests/test_cognitoidp/test_cognitoidp.py
@@ -514,8 +514,8 @@ def test_add_custom_attributes_existing_attribute():
 def test_create_user_pool_default_id_strategy():
     conn = boto3.client("cognito-idp", "us-west-2")
 
-    first_pool = conn.create_user_pool(PoolName=str("default-pool"))
-    second_pool = conn.create_user_pool(PoolName=str("default-pool"))
+    first_pool = conn.create_user_pool(PoolName="default-pool")
+    second_pool = conn.create_user_pool(PoolName="default-pool")
 
     assert first_pool["UserPool"]["Id"] != second_pool["UserPool"]["Id"]
 
@@ -528,8 +528,8 @@ def test_create_user_pool_hash_id_strategy_with_equal_pool_name():
 
     conn = boto3.client("cognito-idp", "us-west-2")
 
-    first_pool = conn.create_user_pool(PoolName=str("default-pool"))
-    second_pool = conn.create_user_pool(PoolName=str("default-pool"))
+    first_pool = conn.create_user_pool(PoolName="default-pool")
+    second_pool = conn.create_user_pool(PoolName="default-pool")
 
     assert first_pool["UserPool"]["Id"] == second_pool["UserPool"]["Id"]
 
@@ -542,8 +542,8 @@ def test_create_user_pool_hash_id_strategy_with_different_pool_name():
 
     conn = boto3.client("cognito-idp", "us-west-2")
 
-    first_pool = conn.create_user_pool(PoolName=str("first-pool"))
-    second_pool = conn.create_user_pool(PoolName=str("second-pool"))
+    first_pool = conn.create_user_pool(PoolName="first-pool")
+    second_pool = conn.create_user_pool(PoolName="second-pool")
 
     assert first_pool["UserPool"]["Id"] != second_pool["UserPool"]["Id"]
 
@@ -557,7 +557,7 @@ def test_create_user_pool_hash_id_strategy_with_different_attributes():
     conn = boto3.client("cognito-idp", "us-west-2")
 
     first_pool = conn.create_user_pool(
-        PoolName=str("default-pool"),
+        PoolName="default-pool",
         Schema=[
             {
                 "Name": "first",
@@ -566,7 +566,7 @@ def test_create_user_pool_hash_id_strategy_with_different_attributes():
         ],
     )
     second_pool = conn.create_user_pool(
-        PoolName=str("default-pool"),
+        PoolName="default-pool",
         Schema=[
             {
                 "Name": "second",
@@ -1545,12 +1545,16 @@ def test_group_in_access_token():
 
 
 @mock_cognitoidp
-def test_group_in_id_token():
+def test_other_attributes_in_id_token():
     conn = boto3.client("cognito-idp", "us-west-2")
 
     username = str(uuid.uuid4())
     temporary_password = "P2$Sword"
-    user_pool_id = conn.create_user_pool(PoolName=str(uuid.uuid4()))["UserPool"]["Id"]
+    user_pool_id = conn.create_user_pool(
+        PoolName=str(uuid.uuid4()),
+        Schema=[{"Name": "myattr", "AttributeDataType": "String"}],
+    )["UserPool"]["Id"]
+
     user_attribute_name = str(uuid.uuid4())
     user_attribute_value = str(uuid.uuid4())
     group_name = str(uuid.uuid4())
@@ -1566,7 +1570,10 @@ def test_group_in_id_token():
         UserPoolId=user_pool_id,
         Username=username,
         TemporaryPassword=temporary_password,
-        UserAttributes=[{"Name": user_attribute_name, "Value": user_attribute_value}],
+        UserAttributes=[
+            {"Name": user_attribute_name, "Value": user_attribute_value},
+            {"Name": "custom:myattr", "Value": "some val"},
+        ],
     )
 
     conn.admin_add_user_to_group(
@@ -1596,6 +1603,7 @@ def test_group_in_id_token():
 
     claims = jwt.get_unverified_claims(result["AuthenticationResult"]["IdToken"])
     assert claims["cognito:groups"] == [group_name]
+    assert claims["custom:myattr"] == "some val"
 
 
 @mock_cognitoidp

Cognito ID/Access Token do not contain user pool custom attributes
Hi,

I notice here that user pool [custom attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-custom-attributes) are not injected into the JWT 

https://github.com/getmoto/moto/blob/624de34d82a1b2c521727b14a2173380e196f1d8/moto/cognitoidp/models.py#L526

As described in the [AWS Cognito docs](https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-the-id-token.html):

> "The ID token can also contain custom attributes that you define in your user pool. Amazon Cognito writes custom attribute values to the ID token as strings regardless of attribute type."

Would it be possible to add the custom attributes to this method?


tests/test_cognitoidp/test_cognitoidp.py::test_other_attributes_in_id_token
tests/test_cognitoidp/test_cognitoidp.py::test_list_groups_when_limit_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_required tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up tests/test_cognitoidp/test_cognitoidp.py::test_get_user_unknown_accesstoken tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_global_sign_out tests/test_cognitoidp/test_cognitoidp.py::test_list_identity_providers_when_max_items_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_group_in_access_token tests/test_cognitoidp/test_cognitoidp.py::test_admin_setting_single_mfa tests/test_cognitoidp/test_cognitoidp.py::test_admin_initiate_auth__use_access_token tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_invalid_schema_values[invalid_max_value] tests/test_cognitoidp/test_cognitoidp.py::test_authorize_user_with_force_password_change_status tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pools_returns_next_tokens tests/test_cognitoidp/test_cognitoidp.py::test_user_authentication_flow tests/test_cognitoidp/test_cognitoidp.py::test_admin_remove_user_from_group_again_is_noop tests/test_cognitoidp/test_cognitoidp.py::test_idtoken_contains_kid_header tests/test_cognitoidp/test_cognitoidp.py::test_admin_list_groups_for_user tests/test_cognitoidp/test_cognitoidp.py::test_admin_disable_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH_unconfirmed_user tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_standard_attribute_with_changed_data_type_or_developer_only[standard_attribute] tests/test_cognitoidp/test_cognitoidp.py::test_respond_to_auth_challenge_with_invalid_secret_hash tests/test_cognitoidp/test_cognitoidp.py::test_add_custom_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_enable_user tests/test_cognitoidp/test_cognitoidp.py::test_create_resource_server tests/test_cognitoidp/test_cognitoidp.py::test_admin_setting_mfa_totp_and_sms tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_string_schema_max_length_over_2048[invalid_max_length] tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_user_with_existing_username_attribute_fails tests/test_cognitoidp/test_cognitoidp.py::test_list_users tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password tests/test_cognitoidp/test_cognitoidp.py::test_list_users_inherent_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_domain_custom_domain_config tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_disabled_user tests/test_cognitoidp/test_cognitoidp.py::test_sign_up_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_update_group tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_attributes_non_existing_pool tests/test_cognitoidp/test_cognitoidp.py::test_confirm_sign_up tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password[pa$$word] tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password[p2ssword] tests/test_cognitoidp/test_cognitoidp.py::test_add_custom_attributes_existing_attribute tests/test_cognitoidp/test_cognitoidp.py::test_list_users_returns_limit_items tests/test_cognitoidp/test_cognitoidp.py::test_admin_get_missing_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_sign_up_with_invalid_password[P2$s] tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_invalid_schema_values[invalid_min_value] tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_client_returns_secret tests/test_cognitoidp/test_cognitoidp.py::test_admin_get_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool__overwrite_template_messages tests/test_cognitoidp/test_cognitoidp.py::test_list_groups tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_attribute_partial_schema tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_developer_only tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_hash_id_strategy_with_equal_pool_name tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_hash_id_strategy_with_different_pool_name tests/test_cognitoidp/test_cognitoidp.py::test_admin_get_missing_user tests/test_cognitoidp/test_cognitoidp.py::test_sign_up_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_setting_mfa_when_token_not_verified tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pool_clients tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pools_when_max_items_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password__custom_policy_provided[password] tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_default_id_strategy tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password_nonexistent_client_id tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up_non_existing_pool tests/test_cognitoidp/test_cognitoidp.py::test_authentication_flow_invalid_user_flow tests/test_cognitoidp/test_cognitoidp.py::test_list_resource_servers_empty_set tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_for_unconfirmed_user tests/test_cognitoidp/test_cognitoidp.py::test_list_users_in_group tests/test_cognitoidp/test_cognitoidp.py::test_list_users_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_authentication_flow_invalid_flow tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH tests/test_cognitoidp/test_cognitoidp.py::test_update_user_attributes_unknown_accesstoken tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_string_schema_min_bigger_than_max tests/test_cognitoidp/test_cognitoidp.py::test_list_groups_returns_pagination_tokens tests/test_cognitoidp/test_cognitoidp.py::test_admin_disable_user tests/test_cognitoidp/test_cognitoidp.py::test_admin_remove_user_from_group_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_update_user_attributes tests/test_cognitoidp/test_cognitoidp.py::test_list_identity_providers_returns_next_tokens tests/test_cognitoidp/test_cognitoidp.py::test_change_password tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_attributes_non_existing_attribute tests/test_cognitoidp/test_cognitoidp.py::test_authentication_flow tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password__custom_policy_provided[P2$$word] tests/test_cognitoidp/test_cognitoidp.py::test_admin_user_global_sign_out_twice tests/test_cognitoidp/test_cognitoidp.py::test_admin_remove_user_from_group tests/test_cognitoidp/test_cognitoidp.py::test_admin_confirm_sign_up_non_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_change_password_with_invalid_token_raises_error tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_resource_not_found tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_REFRESH_TOKEN tests/test_cognitoidp/test_cognitoidp.py::test_admin_add_user_to_group_again_is_noop tests/test_cognitoidp/test_cognitoidp.py::test_list_users_when_limit_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password[P2$S] tests/test_cognitoidp/test_cognitoidp.py::test_admin_resend_invitation_missing_user tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_invalid_schema_values[invalid_max_length] tests/test_cognitoidp/test_cognitoidp.py::test_admin_user_global_sign_out_unknown_userpool tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_attributes tests/test_cognitoidp/test_cognitoidp.py::test_change_password__using_custom_user_agent_header tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_domain tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pools tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_attributes_non_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_update_identity_provider tests/test_cognitoidp/test_cognitoidp.py::test_admin_add_user_to_group tests/test_cognitoidp/test_cognitoidp.py::test_list_users_invalid_attributes tests/test_cognitoidp/test_cognitoidp.py::test_confirm_forgot_password_legacy tests/test_cognitoidp/test_cognitoidp.py::test_delete_group tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool_client tests/test_cognitoidp/test_cognitoidp.py::test_create_group_with_duplicate_name_raises_error tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pools_returns_max_items tests/test_cognitoidp/test_cognitoidp.py::test_update_identity_provider_no_identity_provider tests/test_cognitoidp/test_cognitoidp.py::test_list_users_in_group_returns_pagination_tokens tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_standard_attribute_with_changed_data_type_or_developer_only[developer_only] tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_SRP_AUTH_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_and_change_password tests/test_cognitoidp/test_cognitoidp.py::test_get_user tests/test_cognitoidp/test_cognitoidp.py::test_list_resource_servers_multi_page tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_invalid_user_password[Password] tests/test_cognitoidp/test_cognitoidp.py::test_confirm_forgot_password_opt_in_verification_invalid_confirmation_code tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_SRP_AUTH tests/test_cognitoidp/test_cognitoidp.py::test_setting_mfa tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password_user_with_all_recovery_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_hash_id_strategy_with_different_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_domain tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH_with_FORCE_CHANGE_PASSWORD_status tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_multiple_invocations tests/test_cognitoidp/test_cognitoidp.py::test_list_users_returns_pagination_tokens tests/test_cognitoidp/test_cognitoidp.py::test_list_resource_servers_single_page tests/test_cognitoidp/test_cognitoidp.py::test_admin_enable_user_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pool_clients_returns_max_items tests/test_cognitoidp/test_cognitoidp.py::test_confirm_forgot_password_with_non_existent_client_id_raises_error tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_defaults tests/test_cognitoidp/test_cognitoidp.py::test_create_identity_provider tests/test_cognitoidp/test_cognitoidp.py::test_list_identity_providers tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_with_invalid_secret_hash tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pool_clients_returns_next_tokens tests/test_cognitoidp/test_cognitoidp.py::test_delete_user_pool_domain tests/test_cognitoidp/test_cognitoidp.py::test_admin_list_groups_for_user_with_username_attribute tests/test_cognitoidp/test_cognitoidp.py::test_admin_list_groups_for_user_ignores_deleted_group tests/test_cognitoidp/test_cognitoidp.py::test_list_users_incorrect_filter tests/test_cognitoidp/test_cognitoidp.py::test_get_group tests/test_cognitoidp/test_cognitoidp.py::test_list_identity_providers_returns_max_items tests/test_cognitoidp/test_cognitoidp.py::test_delete_user_pool_client tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_attribute_with_schema tests/test_cognitoidp/test_cognitoidp.py::test_admin_get_user tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool_client_returns_secret tests/test_cognitoidp/test_cognitoidp.py::test_confirm_sign_up_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_user_global_sign_out tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_number_schema_min_bigger_than_max tests/test_cognitoidp/test_cognitoidp.py::test_update_identity_provider_no_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_sign_up_with_invalid_password[p2$$word] tests/test_cognitoidp/test_cognitoidp.py::test_sign_up tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_admin_resend_invitation_existing_user tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_unknown_attribute_data_type tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_client tests/test_cognitoidp/test_cognitoidp.py::test_update_user_pool_domain tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_invalid_auth_flow tests/test_cognitoidp/test_cognitoidp.py::test_global_sign_out_unknown_accesstoken tests/test_cognitoidp/test_cognitoidp.py::test_delete_user_pool tests/test_cognitoidp/test_cognitoidp.py::test_admin_delete_user tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH_user_not_found tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_unconfirmed_user tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_USER_PASSWORD_AUTH_user_incorrect_password tests/test_cognitoidp/test_cognitoidp.py::test_admin_add_user_to_group_with_username_attributes tests/test_cognitoidp/test_cognitoidp.py::test_admin_set_user_password tests/test_cognitoidp/test_cognitoidp.py::test_admin_reset_password_no_verified_notification_channel tests/test_cognitoidp/test_cognitoidp.py::test_set_user_pool_mfa_config tests/test_cognitoidp/test_cognitoidp.py::test_describe_identity_providers tests/test_cognitoidp/test_cognitoidp.py::test_describe_user_pool_estimated_number_of_users tests/test_cognitoidp/test_cognitoidp.py::test_admin_user_global_sign_out_unknown_user tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_custom_attribute_without_data_type tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_client tests/test_cognitoidp/test_cognitoidp.py::test_list_users_in_group_ignores_deleted_user tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_user tests/test_cognitoidp/test_cognitoidp.py::test_delete_identity_providers tests/test_cognitoidp/test_cognitoidp.py::test_admin_initiate_auth_when_token_totp_enabled tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_should_have_all_default_attributes_in_schema tests/test_cognitoidp/test_cognitoidp.py::test_list_user_pool_clients_when_max_items_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_invalid_schema_values[invalid_min_length] tests/test_cognitoidp/test_cognitoidp.py::test_describe_resource_server tests/test_cognitoidp/test_cognitoidp.py::test_update_user_attributes tests/test_cognitoidp/test_cognitoidp.py::test_initiate_auth_invalid_admin_auth_flow tests/test_cognitoidp/test_cognitoidp.py::test_admin_create_user_with_incorrect_username_attribute_type_fails tests/test_cognitoidp/test_cognitoidp.py::test_token_legitimacy tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password_admin_only_recovery tests/test_cognitoidp/test_cognitoidp.py::test_get_user_unconfirmed tests/test_cognitoidp/test_cognitoidp.py::test_confirm_forgot_password_opt_in_verification tests/test_cognitoidp/test_cognitoidp.py::test_login_denied_if_account_disabled tests/test_cognitoidp/test_cognitoidp.py::test_list_users_with_attributes_to_get tests/test_cognitoidp/test_cognitoidp.py::test_create_user_pool_string_schema_max_length_over_2048[invalid_min_length] tests/test_cognitoidp/test_cognitoidp.py::test_list_users_in_group_when_limit_more_than_total_items tests/test_cognitoidp/test_cognitoidp.py::test_forgot_password_nonexistent_user_or_user_without_attributes tests/test_cognitoidp/test_cognitoidp.py::test_create_group tests/test_cognitoidp/test_cognitoidp.py::test_create_resource_server_with_no_scopes tests/test_cognitoidp/test_cognitoidp.py::test_admin_setting_mfa_when_token_not_verified