For the application side
Yes there is. In the window for slack, at the bottom left by your username, there is an up arrow. Click on that and you will see a preferences option.
Once you are in Preferences, Click on Message Display. Within this option, you will find “Display real names instead of usernames”. Make sure this is checked and click on done.
For the API Side
Since this is tagged Slack-api and I’m not sure if this is what you are talking about, within the response of the API from the users.list method, it will return the First/Last name, so you would just have to use it in whatever you are doing. Reference the Docs for the Slack API
{
"ok": true,
"members": [
{
"id": "U023BECGF",
"name": "bobby",
"deleted": false,
"color": "9f69e7",
"profile": {
"first_name": "Bobby",
"last_name": "Tables",
"real_name": "Bobby Tables",
"email": "bobby@slack.com",
"skype": "my-skype-name",
"phone": "+1 (123) 456 7890",
"image_24": "https:\/\/...",
"image_32": "https:\/\/...",
"image_48": "https:\/\/...",
"image_72": "https:\/\/...",
"image_192": "https:\/\/..."
},
"is_admin": true,
"is_owner": true,
"has_2fa": false,
"has_files": true
},
...
]
}