Did you just obtain this phone?
It sounds like you're running aground of the Reset Protection feature, which is the same as Apple's iCloud Activation Lock feature. If your MS account wasn't on that phone before, you'll have to contact the previous owner and have them unlock the device. If this was your phone from the beginning, the Reset Protection Key can likely be obtained from the MS website. I think it'll fall under the Find My Phone/Find My Devices section? I might be wrong.