Getting a SessionId into a Lightning Screen Component

One of the more notorious hacks in Salesforce is the trick that needs to be used from inside Lightning to obtain the SessionId, which is not directly accessible for security reasons. The most popular approach involves creating a Visualforce page.

I stumbled today across another approach that I wasn’t previously aware of. From a Flow Formula, you can access the global variable $Api.Session_ID and simply pass it into your Lightning Component: