Catalyzes the transfer of a single N-acetylglucosamine from UDP-GlcNAc to a serine or threonine residue in cytoplasmic and nuclear proteins resulting in their modification with a beta-linked N-acetylglucosamine (O-GlcNAc). Glycosylates a large and diverse number of proteins including histone H2B, AKT1, ATG4B, EZH2, PFKL, KMT2E/MLL5, MAPT/TAU and HCFC1. Can regulate their cellular processes via cross-talk between glycosylation and phosphorylation or by affecting proteolytic processing. Probably by glycosylating KMT2E/MLL5, stabilizes KMT2E/MLL5 by preventing its ubiquitination (By similarity). Involved in insulin resistance in muscle and adipocyte cells via glycosylating insulin signaling components and inhibiting the 'Thr-308' phosphorylation of AKT1, enhancing IRS1 phosphorylation and attenuating insulin signaling (By similarity). Involved in glycolysis regulation by mediating glycosylation of 6-phosphofructokinase PFKL, inhibiting its activity. Component of a THAP1/THAP3-HCFC1-OGT complex that is required for the regulation of the transcriptional activity of RRM1. Plays a key role in chromatin structure by mediating O-GlcNAcylation of 'Ser-112' of histone H2B: recruited to CpG-rich transcription start sites of active genes via its interaction with TET proteins (TET1, TET2 or TET3). As part of the NSL complex indirectly involved in acetylation of nucleosomal histone H4 on several lysine residues. O-GlcNAcylation of 'Ser-75' of EZH2 increases its stability, and facilitating the formation of H3K27me3 by the PRC2/EED-EZH2 complex. Regulates circadian oscillation of the clock genes and glucose homeostasis in the liver. Stabilizes clock proteins ARNTL/BMAL1 and CLOCK through O-glycosylation, which prevents their ubiquitination and subsequent degradation. Promotes the CLOCK-ARNTL/BMAL1-mediated transcription of genes in the negative loop of the circadian clock such as PER1/2 and CRY1/2. O-glycosylates HCFC1 and regulates its proteolytic processing and transcriptional activity (By similarity). Regulates mitochondrial motility in neurons by mediating glycosylation of TRAK1 (By similarity). Glycosylates HOXA1 (By similarity). O-glycosylates FNIP1 (By similarity). Promotes autophagy by mediating O-glycosylation of ATG4B (By similarity). L-seryl-[protein] + UDP-N-acetyl-alpha-D-glucosamine = 3-O-(N-acetyl-beta-D-glucosaminyl)-L-seryl-[protein] + H(+) + UDP L-threonyl-[protein] + UDP-N-acetyl-alpha-D-glucosamine = 3-O-(N-acetyl-beta-D-glucosaminyl)-L-threonyl-[protein] + H(+) + UDP Protein modification; protein glycosylation. Homotrimer, oligomerizes via TPR repeats 6 and 7. Trimerization is not necessary for activity in vitro, however it increases affinity for UDP-GlcNAc (By similarity). Component of a THAP1/THAP3-HCFC1-OGT complex. Component of the NSL complex at least composed of MOF/KAT8, KANSL1, KANSL2, KANSL3, MCRS1, PHF20, OGT1/OGT, WDR5 and HCFC1. Interacts directly with HCFC1; the interaction O-glycosylates HCFC1, regulates its proteolytic processing and transcriptional activity and, in turn, stabilizes OGT in the nucleus. Interacts (via TPRs 1-6) with SIN3A; the interaction mediates transcriptional repression in parallel with histone deacetylase. Interacts (via TPR 5-6) with TET1, TET2 and TET3 (By similarity). Interacts (via TPR repeats 6 and 7) with ATXN10 (By similarity). Interacts with histone H2B (By similarity). Interacts with ARNTL/BMAL1. Found in a complex composed of at least SINHCAF, SIN3A, HDAC1, SAP30, RBBP4, OGT and TET1. Interacts with SINHCAF (By similarity). Component of a complex composed of KMT2E/MLL5, OGT and USP7; the complex stabilizes KMT2E/MLL5, preventing KMT2E/MLL5 ubiquitination and proteosomal-mediated degradation. Interacts (via TRP repeats) with KMT2E/MLL5 (via N-terminus). Interacts with USP7. Interacts with TRAK1; this interaction is not required for glycosylation of TRAK1 by this protein. Found in a complex with KIF5B, RHOT1, RHOT2 and TRAK1 (By similarity). Interacts (via TPR repeats domain) with HOXA1; the interaction takes place mainly in the nucleus (By similarity). Interacts with NSD2 (By similarity). Mostly in the nucleus. Retained in the nucleus via interaction with HCFC1. After insulin induction, translocated from the nucleus to the cell membrane via phosphatidylinositide binding. Colocalizes with AKT1 at the plasma membrane (By similarity). TRAK1 recruits this protein to mitochondria. In the absence of TRAK1, localizes in cytosol and nucleus (By similarity). The TPR repeat domain is required for substrate binding and oligomerization. Ubiquitinated, leading to its proteasomal degradation. Phosphorylation on Ser-3 or Ser-4 by GSK3-beta positively regulates its activity. Belongs to the glycosyltransferase 41 family. O-GlcNAc transferase subfamily.