Tech giant Microsoft has confirmed that it is eliminating around 4,800 roles, which is about 2.1% of its global workforce.