We would need to know specifically what ID number it is they were asking for, but I'm going to guess they were asking for your IP address. In which case, generally all you need to do is reboot your computer to force it to get a new IP address.
That said, Microsoft will NEVER call you directly. Not without you first contacting them. So any call claiming to be from Microsoft, or really any other large corporation, is a scam. If you think about it, there are tens of millions of people who use Microsoft products the world over, and they noticed something with your specific computer, going out of their way to assist you. It just doesn't make a lot of sense, so it's best to just hang up and report the number used to call you to the police if you have it.