A controlling method of an electronic device for executing an application, the method comprising: in response to an event for inquiring about allowing an access right, displaying a user interface, UI, to confirm whether to allow the access right to a function of the electronic device required for executing an application; and in response to a user command being input through the UI, matching and storing a state of the application according to the event and a determination of whether to allow the access right to the function according to the user command, wherein the method further comprises: in response to the application being executed for the first time, displaying a second UI to confirm whether to allow an access right to the function of the electronic device when the application is executed in a foreground state, whether to allow an access right to the function of the electronic device when the application is executed in a background state, and whether to allow a temporary access right for a function of the electronic device which is required for authentication; if a user command is input through the UI which allows a temporary access right, allowing a temporary access right for the function of the electronic device which is required for authentication and, when the authentication is completed, blocking the access right to the function that is required for the authentication; and in response to the application being executed in the background, and a state of a battery of the electronic device being equal to or less than a preset value, blocking the access right to the function of the electronic device required for executing the application, wherein the foreground state is a state in which a user can operate the application directly, and the background state is a state in which the application operates but the user cannot operate the application. in response to an event for inquiring about allowing an access right, displaying a user interface, UI, to confirm whether to allow the access right to a function of the electronic device required for executing an application; and in response to a user command being input through the UI, matching and storing a state of the application according to the event and a determination of whether to allow the access right to the function according to the user command, wherein the method further comprises: in response to the application being executed for the first time, displaying a second UI to confirm whether to allow an access right to the function of the electronic device when the application is executed in a foreground state, whether to allow an access right to the function of the electronic device when the application is executed in a background state, and whether to allow a temporary access right for a function of the electronic device which is required for authentication; if a user command is input through the UI which allows a temporary access right, allowing a temporary access right for the function of the electronic device which is required for authentication and, when the authentication is completed, blocking the access right to the function that is required for the authentication; and in response to the application being executed in the background, and a state of a battery of the electronic device being equal to or less than a preset value, blocking the access right to the function of the electronic device required for executing the application, wherein the foreground state is a state in which a user can operate the application directly, and the background state is a state in which the application operates but the user cannot operate the application. in response to the application being executed for the first time, displaying a second UI to confirm whether to allow an access right to the function of the electronic device when the application is executed in a foreground state, whether to allow an access right to the function of the electronic device when the application is executed in a background state, and whether to allow a temporary access right for a function of the electronic device which is required for authentication; if a user command is input through the UI which allows a temporary access right, allowing a temporary access right for the function of the electronic device which is required for authentication and, when the authentication is completed, blocking the access right to the function that is required for the authentication; and in response to the application being executed in the background, and a state of a battery of the electronic device being equal to or less than a preset value, blocking the access right to the function of the electronic device required for executing the application, wherein the foreground state is a state in which a user can operate the application directly, and the background state is a state in which the application operates but the user cannot operate the application.