1. An electronic apparatus having an authentication function that can limit use for each function, comprising: a function processing unit configured to execute functions that the electronic apparatus has; a determination unit configured to, upon reception of an execution instruction to execute a function from a user, determine whether the function needs data that is set on a user-by-user basis; and a control unit configured to perform control so as to, in a case where the determination unit determines that the data that is set on a user-by-user basis is needed, determine whether the user who issued the execution instruction has been authenticated by the authentication function, and in a case of determining that the user has been authenticated, give data that is set for the authenticated user to the corresponding function processing unit, and cause the instructed function to be executed, and perform control so as to, in a case where the user who issued the execution instruction has not been subjected to authentication, cause the authentication function to perform authentication on the user, and in a case where the user is authenticated by the authentication function, give the data that is set for the authenticated user to the corresponding function processing unit, and cause the instructed function to be executed.