function listUserProfiles() {
// Retrieve the list of available user profiles
try {
const profiles = DoubleClickCampaigns.UserProfiles.list();
if (profiles.items) {
// Print out the user ID and name of each
for (let i = 0; i < profiles.items.length; i++) {
const profile = profiles.items[i];
Logger.log('Found profile with ID %s and name "%s".',
profile.profileId, profile.userName);
}
}
} catch (e) {
// TODO (Developer) - Handle exception
Logger.log('Failed with error: %s', e.error);
}
}