Chief executive Satya Nadella says cuts will cost $1.2bn as tech firms scale back from Covid growth.