Hello @Shahin Mortazave
The Password Writeback feature is enabled by using AD Connect and it gets enabled for entire tenant. However, if you want to restrict only 5 users during test phase, you can add those users to a Group and add that group under SSPR as shown below:
a
In this case, only the members of this group can reset their passwords, which will be written back to On-premises Active Directory. Users, who are not part of the group can't reset their passwords. Hence password writeback won't happen for them.
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.