Several federal government departments — including the Canada Border Services Agency, the Correctional Service of Canada and the RCMP — have restricted who can see their job ads on Facebook by age, which could violate Canadian human rights law.

Documents tabled in the House of Commons reveal, for example, that the CBSA ran four jobs on Facebook since March 2017, three of which would only have been seen by Facebook users between the ages of 18 and 34. The Correctional Service of Canada, which runs Canada's federal prisons, ran 11 Facebook ads since September 2018, all of them targeting people 18 to 35 years old.

Two ads from the RCMP were even more targeted. One in January 2017 was directed at 18 to 24 year olds, while a second one in January 2018 was set to reach 18 to 34 year olds.

'The government has to explain itself'

Conservative MP Peter Kent said the federal government should not be excluding some Canadians from being able to see job opportunities.

"It is fundamentally against the law. The government has to explain itself now, those departments that placed those inappropriate microtargeted ads on the basis of age and gender have to explain themselves," he said. "And perhaps those postings, if they have not yet been filled, should be reviewed, revisited and perhaps some of those postings should be reopened."

Conservative MP Peter Kent says the government could be liable to court action for excluding some potential candidates from seeing ads based on age. (Justin Tang/The Canadian Press)

The documents outlining microtargeted job ads by several departments come nearly two months after an investigation by CBC News showed dozens of employers across Canada — including federal, provincial and municipal governments — have posted jobs on Facebook that excluded some Canadians by age or gender.

While the text of the ads didn't mention age, the settings that determine who will see those ads often excluded older workers.

Under federal and provincial human rights laws in Canada, employers aren't allowed to restrict who sees job ads based on criteria like age, gender, race or religion, unless the restriction is a bona fide occupational requirement or is part of a special initiative like a summer job program.

Facebook has said that it will change its system in the U.S. by the end of the year to prohibit employers from microtargeting job ads by criteria like age — part of a bid to settle human rights lawsuits in the U.S.

Microtargeting violates Facebook policy

Kevin Chan, head of public policy for Facebook Canada, told members of the International Grand Committee meeting in Ottawa Tuesday that microtargeting job ads by factors like age and gender violates Facebook's policies.

"We have actually moved quite aggressively in the last little while to remove a whole bunch of different targeting abilities for these types of ads. We have also, for housing, employment and credit ads," he said. "We have required all advertisers on a go -forward basis to certify that they are not running (microtargeted) housing and credit and employment ads."

The documents tabled in the House of Commons Monday show that while many departments have not used Facebook to post job ads, several have used Facebook and its microtargeting ability to exclude some potential candidates from seeing job opportunities.

The Canada Revenue Agency advertised "numerous" government jobs in March 2017 microtargeted to Facebook users between the ages of 24 and 49. The CRA ads were also microtargeted to fields of study like accounting, mechanical engineering, petroleum engineering and software engineering.

The agency also launched an Indigenous campaign that month to fill student positions using the names of various First Nations communities and groups.

The Canadian Coast guard's medium icebreaker Henry Larsen is seen in Allen Bay during Operation Nanook near Resolute, Nunavut, August 25, 2010. (Sean Kilpatrick/Canadian Press)

Parks Canada ran a dozen Facebook ads between September 2016 and April 2019. Ten of the 12 ads targeted Nunavut Inuit and excluded "all non Nunavut Inuit."

The Canadian Coast Guard ran Facebook ads that were microtargeted by both age and, at times, gender. For example, ads in November 2017 to fill several jobs targeted "Male youth aged 16-24" or "Female youth aged 16-24," "All aged 45+" or "Overall skilled workers aged 25-44, particularly women, Indigenous communities and visible minorities." An ad in February 2018 for a fishery officer position targeted women and "people residing in or near Indigenous communities," "outdoor enthusiasts" and "individuals with an interest in law enforcement."

The Immigration and Refugee Board of Canada ran Facebook ads in June 2018 to recruit members for the Refugee Protection Division. It targeted those ads at university graduates between the ages of 30 and 60 who lived in the Montreal region and were interested in immigration and human rights law.

However, an ad in January 2018 for a member of the Refugee Appeal Division targeted university graduates living in Calgary, Vancouver, Toronto, Ottawa or Montreal, but was not targeted by age.

Another ad in June 2018 for a Yoruba interpreter was directed at people aged 20 to 65 years old who lived in the Montreal area.

The Department of National Defence said it doesn't rely on demographic data to microtarget ads to specific subsets of Facebook users, but did target women in its Strong, Secure, Engaged campaign to increase the number of female recruits.

"This ensures that funds set aside for advertising are allocated effectively," said the department in the documents.

A risk of lawsuits

Agriculture and Agri-Food Canada said it had used microtargeting for 13 job ads but did not spell out how they were microtargeted. The "intent was not to target a specific group but general population," it wrote in its response.

Kent said the government's decision to exclude some Canadians from seeing the ads it posted on Facebook could leave it open to lawsuits.

"I would think that there would probably be cause for legal action by any who felt that they were discriminated against in terms of applying for what should be an open, equal opportunity position," he said.

NDP MP Charlie Angus says the government has to send a clear message to departments that microtargeting job ads by age isn't acceptable. (Adrian Wyld/The Canadian Press)

NDP MP Charlie Angus said age discrimination in job ads is not acceptable, particularly with Canadians being forced to return to the workforce at an older age or living on contract work after having been downsized.

"I think the government has to send a very clear message that it will not allow departments to discriminate based on age because if the federal government can do it, then all manner of other businesses can do it," he said. "And that's not acceptable in Canada and it's not acceptable under the laws that we have."

Federal government officials have not yet responded to questions for CBC News.

Elizabeth Thompson can be reached at elizabeth.thompson@cbc.ca