If you need information from your spouse (such as their social security number) and cannot get it, you will have to mail in your tax return. You will not be able to e-file without information, such as their social security number, and it will most likely get rejected if it is incorrect. Therefore, it is best to mail in your return.
In this situation, it is common to either:
- Include a cover letter with the return explaining the situation and giving a reason to why your spouse's information is missing.
- Write refused in the boxes of information you cannot obtain.