In the canonical ensemble the entropy is given by $$ \begin{equation*} S =k_{B}lnZ +k_{B}T\left(\frac{\partial lnZ}{\partial T}\right)_{N, V}, \end{equation*} $$ and the pressure by $$ \begin{equation*} p=k_{B}T\left(\frac{\partial lnZ}{\partial V}\right)_{N, T}. \end{equation*} $$ Similarly we can compute the chemical potential as $$ \begin{equation*} \mu =-k_{B}T\left(\frac{\partial lnZ}{\partial N}\right)_{V, T}. \end{equation*} $$