This guide explains how to authenticate a user on Cloud Pages (just like you are doing): https://sf-marketing.com/marketing-cloud-user-validation-on-cloudpages/
What is ALSO explains, is the use of getUserInfo call, to get additional information about the authenticated user - a.o. name and email address.
curl "https://{subdomain}.auth.marketingcloudapis.com/v2/userinfo" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
A sample response will contain:
{
"exp": 1691268129,
"iss": "https://mc.exacttarget.com",
"user": {
"sub": "334455667",
"name": "Michele Hansley",
"preferred_username": "d8c80930-30d9-411a-8613-d4209e3de1d9",
"email": "",
"locale": "en-US",
"zoneinfo": "America/Chicago",
"timezone": {
"longName": "(GMT-06:00) Central Time (US & Canada) *",
"shortName": "GMT-6",
"offset": -6,
"dst": true
}
},
"organization": {
"member_id": 99999,
"enterprise_id": 99999,
"enterprise_name": "Northern Trail Outfitters",
"account_type": "core",
"stack_key": "S1",
"region": "NA1",
"locale": "en-US",
"zoneinfo": "America/Chicago",
"timezone": {
"longName": "(GMT-06:00) Central Time (US & Canada) *",
"shortName": "GMT-6",
"offset": -6,
"dst": true
}
},
"rest": {
"rest_instance_url": "https://mct3f0q1y5rhhc20--l3kexample.rest.marketingcloudapis.com/",
"soap_instance_url": "https://mct3f0q1y5rhhc20--l3kexample.soap.marketingcloudapis.com/"
},
"application": {
"id": "06238661-8596-4abb-bd06-49e2a5465b9a",
"name": "API Application",
"redirectUrl": [],
"appScopes": [
"campaign_read",
"campaign_write"
]
},
"permissions": [
{
"objectTypeName": "Email",
"operationName": "Create",
"name": "Create",
"id": 4
},
{
"objectTypeName": "Email",
"operationName": "View",
"name": "View",
"id": 5
},
{
"objectTypeName": "Email",
"operationName": "Update",
"name": "Update",
"id": 6
},
{
"objectTypeName": "Email",
"operationName": "Delete",
"name": "Delete",
"id": 7
}
]
}