In this video, Adam shows an easier approach to get a Power BI Embed Token using PowerShell. This removes the headache of writing code or having to worry about an authentication token.

Power BI Embedded Playground

Invoke-PowerBIRestMethod Documentation

GenerateToken for Reports in a Group

PowerShell download