Spies and other MI5 employees will receive workplace advice and support under a new deal signed at the TUC conference in Brighton.
The Security Service (MI5) and its staff association have reached an agreement with the FDA - the union for senior managers in the Civil Service - for the union to provide industrial relations support to staff.
Employees will not become full members of the FDA, but the union will work closely with the staff association "on issues that affect the interests of staff".
The agreement builds on the arrangements that the FDA has in other sensitive areas of government and is designed to improve the access of the staff association to support and advice, while protecting personal anonymity and national security.
FDA general secretary Jonathan Baume said: "This arrangement is really good news for the security service and its staff. This vital public service needs to recruit and retain the very best people and will only do so by offering competitive remuneration packages as well as providing staff with the confidence that the organisation values and respects their contribution."
The FDA represents 18,000 of the UK's senior public servants.