NetworkManager.SpawnWithclientAuthority()

how do I spawn a gameobject with client authority outside of a NetworkManager script. I am able to spawn these objects inside of OnClientConnect(NetworkConnection conn) {} but I want to make it so that if a user clicks a button, the gameobject will spawn next to their base with authority. why is this such a complicated thing to do in unity? lmao

This is what I have:

 GameObject ant = Resources.Load("Prefabs/unit1") as GameObject;
        Vector3 antspawnLocation = new Vector3(WorldHandler.findAntHill().transform.position.x - Random.Range(-5, 5), 0, WorldHandler.findAntHill().transform.position.z); // ant spawnlocation
        GameObject antToSpawn = (GameObject)Instantiate(ant, antspawnLocation, Quaternion.identity); // antstospawn

        NetworkServer.SpawnWithClientAuthority(antToSpawn, GetComponent<NetworkIdentity>().connectionToServer);