An electronic device comprising: a display; a memory configured to store at least one piece of information to be output on the display; an input device comprising input circuitry configured to receive an input; and a processor electrically connected with the display, the input device, and the memory, wherein the processor is configured to: when an input event for executing a voice command function occurs, execute the voice command function and collect a voice command; determine whether the electronic device is in a locked state; if the electronic device is not in the locked state, provide an entire function execution state of a function corresponding to the collected voice command, in which access to entire information stored in the memory is allowed; and if the electronic device is in the locked state: determine a lock setting of the locked state; if the lock setting corresponds to a first locked state where unlocking the first locked state requires completion of user authentication, provide a partial function execution state of the function, in which access to only a part of the information stored in the memory is allowed, and if the lock setting corresponds to a second locked state, different from the first locked state, where unlocking the second locked state requires a specified gesture input and does not require completion of user authentication, provide the entire function execution state of the function, and output, on a screen in the second locked state, results corresponding to the collected voice command based on the entire function execution state. a display; a memory configured to store at least one piece of information to be output on the display; an input device comprising input circuitry configured to receive an input; and a processor electrically connected with the display, the input device, and the memory, wherein the processor is configured to: when an input event for executing a voice command function occurs, execute the voice command function and collect a voice command; determine whether the electronic device is in a locked state; if the electronic device is not in the locked state, provide an entire function execution state of a function corresponding to the collected voice command, in which access to entire information stored in the memory is allowed; and if the electronic device is in the locked state: determine a lock setting of the locked state; if the lock setting corresponds to a first locked state where unlocking the first locked state requires completion of user authentication, provide a partial function execution state of the function, in which access to only a part of the information stored in the memory is allowed, and if the lock setting corresponds to a second locked state, different from the first locked state, where unlocking the second locked state requires a specified gesture input and does not require completion of user authentication, provide the entire function execution state of the function, and output, on a screen in the second locked state, results corresponding to the collected voice command based on the entire function execution state. when an input event for executing a voice command function occurs, execute the voice command function and collect a voice command; determine whether the electronic device is in a locked state; if the electronic device is not in the locked state, provide an entire function execution state of a function corresponding to the collected voice command, in which access to entire information stored in the memory is allowed; and if the electronic device is in the locked state: determine a lock setting of the locked state; if the lock setting corresponds to a first locked state where unlocking the first locked state requires completion of user authentication, provide a partial function execution state of the function, in which access to only a part of the information stored in the memory is allowed, and if the lock setting corresponds to a second locked state, different from the first locked state, where unlocking the second locked state requires a specified gesture input and does not require completion of user authentication, provide the entire function execution state of the function, and output, on a screen in the second locked state, results corresponding to the collected voice command based on the entire function execution state. determine a lock setting of the locked state; if the lock setting corresponds to a first locked state where unlocking the first locked state requires completion of user authentication, provide a partial function execution state of the function, in which access to only a part of the information stored in the memory is allowed, and if the lock setting corresponds to a second locked state, different from the first locked state, where unlocking the second locked state requires a specified gesture input and does not require completion of user authentication, provide the entire function execution state of the function, and output, on a screen in the second locked state, results corresponding to the collected voice command based on the entire function execution state.