Are you asking how long Xanax is detectable in urine/compliance testing? It depends on a few factors- how much and how often you are taking Xanax and the type of testing being done.
If the Xanax is prescribed to you- the results would show positive if you are taking it as prescribed.