Thanks for clarifying! You should be using an M2M application to instantiate the ManagementClient:
ManagementClient