0

I have created a cloud page in SFMC Web Studio which contians some user input fields like Campaign Name, Brand Name, Start Date, End Date, Campaign Cap. The Cloud page is SSO enabled which means only the users in Marketing Cloud can access the page and it requires user to Login to MC to visit on the cloud page.

Requirement: There is requirement that while storing the data in DE from cloud page I need one additional field Modified_By to be populated in DE, which should I contain the email address of the user who has filled and submitted the form. How can I achieve this?

Thanks in Advance!

1 Answer 1

0

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
    }
  ]
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .