This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The ReAssignJobsByLogin method changes ownership for any SQL Server Agent jobs currently owned by a Microsoft SQL Server login.
By default, any SQL Server login has membership, through the user guest, in the public role of the system database maintaining SQL Server Agent jobs (msdb). When a SQL Server user is created in msdb, jobs created by the user mapping the login are owned by the login, not the user.
Reassigning SQL Server Agent job ownership by using the ReAssignJobsByLogin method requires appropriate permission. The SQL Server login used for SQLServer object connection must be a member of the fixed role sysadmin.