There are different approaches to this. One approach is to ensure that green roof soil depth and retention capacity allows for the 2-year, 24-hour design storm.

However, simply taking a “CN credit” for a green roof is usually beneficial enough. (The Curve Number or CN provides a number characterizing the runoff properties for a particular soil and ground cover.) Instead of the roof being modeled as impervious (with a CN of 98 which produces a high rate of runoff) some projects with extensive green roofs have used a lawn CN—usually around 61. In the calculations this results in a lower overall rate of runoff for the site, and is usually a more feasible option that providing stormwater storage in the roof media itself. If you can model your site so there is less runoff, there is less runoff volume that needs to be stored.

Question
How can green roofs count as a stormwater control measure?