Australia's spies are “pleased” with the passing of “critical” data retention legislation.

More than 20 government agencies, such as ASIO, the AFP, state police forces, ASIC, and consumer watchdog the ACCC, can now authorise access to the two years’ worth of information being mandatorily retained.

In a statement to some local media outlets this week, ASIO said it would be extremely useful.

“Access to historical communications data is vitally important in ASIO's effort to identify threats to Australia's security and keep Australians and Australia's interests safe,” the statement said.

“The legislation will ensure that ASIO is able to keep pace with a rapidly changing communications environment.”

A working group which that features several telecoms industry stakeholders has been set up to implement the legislation, but insiders say this will take up to two years.

ASIO told reporters that it would remain “highly accountable through a range of external and internal processes”.

It will be subject to some level of extra regulation, due to the appointment of a public interest advocate who can argue against the granting of warrants.