Morphisms from relative spec of an $\mathcal O_X$ algebra Let $X$ be a scheme, and $\mathcal A$ be an quasi-coherent $\mathcal O_X$ algebra. Suppose we have a morphism $\mu:W \rightarrow X$ and also a morphism of sheaves from $\mu_{*}(\mathcal O_W)$ to $ \mathcal A$. Does that imply there exists an $X$-morphism from $spec(\mathcal A)$ to $W$?
 A: First of all, you have to assume that your morphism $\mu_* \mathcal O_W \to \mathcal A$ is a morphism of sheaves of $\mathcal O_X$-algebras. If that is not the case, there is no hope whatsoever that an induced morphism $\mathcal{Spec}_X(A) \to W$ would be an $X$-morphism.
But even then, the answer is negative in general.
If $\pi$ is not affine, the claim is false: Just take $X=\operatorname{Spec} \mathbb Z$, $A=\mathbb Z[x_1, \dotsc, x_n]$ and $W=\mathbb P^n_\mathbb Z$. Then there is a unique ring map $\mathbb Z = \mu_* \mathcal O_W \to A$, but there are many different morphisms $\operatorname{Spec} A = \mathbb A^n_\mathbb Z \to W=\mathbb P^n_\mathbb Z$ from affine to projective space.

However, if $\pi$ is affine, the claim is true. In this case, we actually have $W=\mathcal{Spec}_X(\pi_* \mathcal O_W)$. Denote the map $\mathcal{Spec}_X(A) \to X$ by $p$. We indeed have
$$\operatorname{Hom}_{\textbf{Sch}/X}(\mathcal{Spec}_X(A),W) = \operatorname{Hom}_{\textbf{Sch}/X}(\mathcal{Spec}_X(A),\mathcal{Spec}_X(\pi_* \mathcal O_W)) \\= \operatorname{Hom}_{\mathcal O_X-\textbf{Alg}}(\pi_* \mathcal O_W,p_*\mathcal O_{\mathcal{Spec}_X(A)}) = \operatorname{Hom}_{\mathcal O_X-\textbf{Alg}}(\pi_* \mathcal O_W,\mathcal A)$$
