I'm not sure I understand your first question regarding parameterized functions. Can you elaborate a bit more or share an example?
As for auto refreshing the token for OAuth, there is no easy way today to achieve that. We are working on some extensibility capabilities for Power BI Desktop that should enable this scenario, but there is no ETA at the moment. However, we are shooting for the first half of 2017.