Ident_current, scope_identity and @@ identity. These three functions returned to the final generated identification value. However, they are different from the "last" roles and sessions.
Ident_current returns the identifier value of the last generated to any session and any scope. @@ iDENTITY Returns the final generated identity value of any table in all scopes of the current session. Scope_identity returns the identifier value that is finally generated for any table in the current session and the current scope.
E.g: