It is not essential to mention the name of the person on whose behalf one is doing Hajj or ‘umrah
Question

Is it essential to speak the intention out loud when intending to do ‘umrah on behalf of one of my relatives who is deceased, by saying, “Here I am, O Allah, for ‘umrah for my grandfather”?
Praise be to Allah.Firstly:
It is permissible for a person to do Hajj or ‘umrah on behalf of someone else, on condition that he has already done Hajj or ‘umrah on his own behalf, because of the hadith of Ibn ‘Abbaas (may Allah be pleased with him), according to which the Messenger of Allah (blessings and peace of Allah be upon him) heard a man saying, Labbayka ‘an Shubrumah (Here I am on behalf of Shubrumah). The Messenger of Allah (blessings and peace of Allah be upon him) said to him: “Who is Shubrumah?” He said: A relative of mine. He said: “Have you ever done Hajj before?” He said: No. He said: “Then make this (Hajj) on your own behalf, then do Hajj on behalf of Shubrumah.” Narrated by Abu Daawood (1811) and Ibn Maajah (2903).
This hadith was classed as saheeh by Shaykh al-Albaani in Irwaa’ al-Ghaleel (4/171).
Secondly:
It is not essential when doing Hajj and ‘umrah on behalf of another person to mention the name of the person on whose behalf it is intended, or to utter that out loud; rather it is sufficient to form the intention to do it on his behalf, and the place for the intention is the heart.
But it is preferable to say when beginning to recite the Talbiyah: Labbayk Allahumma ‘an [fulaan] (Here I am, O Allah, on behalf of [So and so] – as is mentioned in the hadith of Ibn ‘Abbaas quoted above.
It says in Fataawa al-Lajnah ad-Daa’imah li’l-Iftaa’: With regard to doing Hajj on behalf of someone else, it is sufficient to form the intention to do it on his behalf, and it is not necessary to name the person on whose behalf it is being done, whether by mentioning his given name on its own or in conjunction with the name of his father or mother. If the pilgrim mentions that name when entering ihraam or when reciting the Talbiyah or when slaughtering the sacrifice if he is doing tamattu‘ [‘umrah followed by Hajj, exiting ihraam in between] or qiraan [‘umrah followed by Hajj, without exiting ihraam in between], then that is fine, because of the report which was narrated by Abu Dawood and Ibn Maajah, and classed as saheeh by Ibn Hibbaan, from Ibn ‘Abbaas (may Allah be pleased with him), according to which the Prophet (blessings and peace of Allah be upon him) heard a man saying, “Here I am on behalf of Shubrumah. He said: “Who is Shubrumah?” The man said: A brother of mine, or a relative of mine. He said: Have you done Hajj on your own behalf? He said: No. He said: “Do Hajj on your own behalf, then do Hajj on behalf of Shubrumah.” End quote.
Fataawa al-Lajnah ad-Daa’imah li’l-Iftaa’ (11/82).
Shaykh Ibn Baaz (may Allah have mercy on him) was asked:
A man did Hajj on behalf of a woman, but when he wanted to enter ihraam at the miqaat, he forgot her name. What should he do?
He replied:
If he is doing Hajj on behalf of a woman or a man, and forgets the person’s name, it is sufficient for him to form the intention, and there is no need to mention the name. If he forms the intention when entering ihraam that this Hajj is on behalf of the one who gave him the money, that is sufficient. The intention is sufficient, because actions are but by intentions, as it says in the hadith from the Messenger of Allah (blessings and peace of Allah be upon him). End quote.
Majmoo‘ Fataawa Ibn Baaz (17/79).
And Allah knows best.