Very strong anti-piracy measures are in place to detect when an illegal digital switch game is being played online. Once detected, Nintendo will ban access to online play, although offline play will still be possible.
Back in April, a Switch hack was discovered that can not be patched by Nintendo without Nvidia being asked to redesign the Tegra X1 processor. However, if you're tempted to download and play pirate copies of Switch games online, think again, as Nintendo can “detect” illegal copies of Switch titles.
As IGN reports, Reddit user games are authorized when played online. It turns out that Nintendo has implemented a four-stage process that allows for “very strong anti-piracy measures”
Looks like we've got confirmation that Nintendo is banning gamecart certificates (I guess people are not taking my advice … ). The relevant error for trying to use a gamecard with a banned cert is 0x1F727C – 2124-4025.– Michael (@SciresM) June 20, 2018
To begin with your console checks, it can connect to the internet and then verifies itself through a device authorization token. If Nintendo bans a Switch from going online, it's at this stage the connection will fail. Otherwise, the process goes on to authorize the Nintendo account associated with the console and then an application authorization token.
In the case of a digital game, Nintendo uses a ticket system. The ticket is formulated from the game's Title ID, the Device ID of the console the game was purchased on, and the Nintendo Account ID used to purchase it. As digital games can not be re-sold or transferred, the ticket is unique and can not be forged. Therefore, Nintendo can easily (and indeed) detect when a digital game is being played on a different Switch or different Nintendo can simply detectable when a pirate copy has been uploaded on to a cart. I do not believe this, but it inevitably is, Nintendo will be ready to ban you for attempting to play it online.
The advice, as always, is do not play pirate games. By doing so, you just got banned online,