
Quoting
tonynewman
she is acting out due to being told what to do or some other issue (could be a number of things) defuse the situation with my advice, she is 17 with only months left until 18 become a friend, get to know her on that level at this point, it will work wonders.
instead of "do not do this, if you do this is how you will be punished" type of thing that will only create resentment and or a sneaky teenager
try "as a friend this is my concern, or that really makes me worry about you when..." type of speaking with no penalties, "if you ever need help you can call me no matter what at anytime and I will be there for you and not yell and judge"
treat her as a peer/adult now, that is what most acting out 17 year old girls want, doing this will help bring you closer and she will learn to be able to come to you for advice like her friends, it will take some time for her to develop this new found trust, but its a proven method, she is not a little girl anymore and does not want to be treated as such, by giving her all this freedom she will tone down. you will also now be able to really understand her issues as she will come and talk about issues young adults have as a friend and not worry about penalties and judging/yelling.