Frequency response of a microphone using a sine sweep
Say $\mathbf{h}_1$ and $\mathbf{h}_2$ are the impulse response coefficients of mic1 and mic2, respectively, where $\mathbf{h}_1$ is known. Let $\mathbf{x}$ represent the input signal. Then, we can write the output of mic1 as

\begin{align}
\mathbf{b} = \mathbf{X} \mathbf{h}_1
\end{align}
where $\mathbf{X}$ is a Toeplitz matrix. If you want to find the impulse response coefficients of mic2, then you need to solve the following optimization problem
\begin{align}
\arg \min_{\mathbf{h}_2} ||\mathbf{X} \mathbf{h}_2 - \mathbf{b}||^2_2
\end{align}

The solution to the above problem is a simple least-squares solution. In the above formulation, I tried to express the convolution operation as a matrix multiplication. Find the filter coefficient response and express the transfer function in terms of $H_2(z)$. Once you know the transfer function, it is easy to determine the magnitude and phase response.