1. A computer implemented method for handling user groups in desktop and web based applications in heterogeneous authentication environments, said method comprising: creating a plurality of first user groups in a security model used by an application; adding an external group name attribute to each of said plurality of first user groups, the external group name attribute mapping each of the plurality of first user groups and one or more of a plurality of second user groups; setting the value of each of the external group name attributes to a name corresponding to each of a plurality of second user groups, said each of the plurality of second user groups mapped to one or more other authentication sources; granting a plurality of privileges to said plurality of first user groups as required by said application; using said security model to authenticate a user, the user assigned to at least one of the plurality of first user groups; identifying, via a computer, a list of groups associated to the user, via said security model, by reading from said external group name attribute a plurality of user group names associated to said user, wherein said plurality of user group names is a list of said plurality of second user groups; causing said user to inherit a plurality of privileges for each of said plurality of second user groups identified in said plurality of user group names list based on said security model authentication; allowing the user to log into said application by way of said security model; and wherein the creating, adding, setting, and granting are repeated for a plurality of applications, each of the plurality of applications comprising a security model, and authenticating to at least one of said one or more other authentication sources.