The group’s Amaq news agency made the claim offering no evidence to support it.
Indonesian police shot dead four of the assailants after they used samurai swords to attack the officers, a police spokesman said, Reuters reported.
Four men armed with samurai swords and firearms attacked a police station in Sumatra.
The attackers targeted officers after ramming a minivan into a gate at the police headquarters in Pekanbaru, the capital of Riau province.
A fifth man, who drove the vehicle, was arrested while attempting to escape.
"When the car broke through into the Riau police headquarters, it was blocked by policemen," national police spokesman Seyto Wasisto told a televised news conference.
"Then four of the men got out from the car and attacked police," he added.