How to configure scope depending on group assignment to the user?

Hi,

When I watching the video Training Sneak Peek: API Access Management with OAuth (youtube.com), I saw that scopes return to access token can be changed based on different group assigned. Is it still valid?

Promo Users (https://youtu.be/4iQE2I2jEeo?si=Jh4l7K1gKQIHMagD&t=510) assigned and access token getting promo:read scope only.

Promo Admin (https://youtu.be/4iQE2I2jEeo?si=bZcax9TVuYZuRHtT&t=620) assigned and access token getting promo:read, promo:create, promo:delete scopes.

If it is still valid, how do we configure to have similar behaviour?

Need help on this. Any idea?

Is this done by inline hooks? Are there any steps that I can follow?