Tl;DR: Urea is a metabolic waste excreted from human body. As such it does not have any function in human body. It is a major product in the waste excreted from kidneys although trace amounts can be found in sweat. The concentration of urea increases when kidneys fails to function normally. Hence, they are excreted through sweat glands, observed as "frosts" on the skin among uremic patients.
Urea is a normal metabolic waste which are excreted by the kidneys but are also excreted from human body via sweat. In fact, sweat contains trace amount of urea, about 22.2 mmol/L (Huang.et.al. 2002; More on the concentration of urea in thermal sweat has been discussed by Bulmer, 1957). Urea is excreted by eccrine glands. As such, it is also thought to be an excretory organ (urea transferred across eccrine glands is discussed by Komives. et.al, 1966). However, the concentration of urea and uric acid doesn't affect much in the homeostasis function (as they are in negligible amount compared to metabolic waste in kidneys. Sweat seems to play the role of thermoregulation):
urea readily crosses the eccrine glandular wall and cell membrane and therefore concentrations of urea in sweat are expected to be about the same as that of the plasma. Some studies report very high urea concentrations in sweat , up to 50x that of serum, and suggest that this is evidence for a selective transport mechanism across the sweat gland, especially in patients with kidney damage, to clear the blood of high urea concentrations (Al-Tamer et.al., 1997).
Other studies have shown that uric acid and creatinine excretion via sweat is insignificant compared with elimination rates through the kidneys. Taken together, there is limited evidence that the sweat glands excretory function makes a substantial contribution to homeostasis.
As noted by Keller et.al. 2016, the concentration of urea and uric acid in sweat increases when kidneys fails to function normally:
In humans, urea is excreted in sweat, largely through the eccrine sweat gland. The urea concentration in human sweat is elevated when compared to blood urea nitrogen. The sweat urea nitrogen (UN) of patients with end‐stage kidney disease (ESRD) is increased when compared with healthy humans. The ability to produce sweat is maintained in the overwhelming majority of ESRD patients.
Also, urea concentration in sweat seems to be different among genders:
The sex difference in sweat UN was a surprising finding. In humans, the menstrual cycle is known to change the characteristics of thermoregulation and electrolyte balance. Estrogen lowers core body temperature at rest and during heat stress. Additionally, estrogen replacement therapy increases total body sodium.