Structure
Verb + 間に
[い]Adjective + 間に
[な]Adjective + な + 間に
Noun + の + 間に
Details
Standard
About の間に
間に is an expression that can be used with almost any type of word, to highlight that (A) is the period/space within which something else will or did happen/exist. It may also be a period/space 'until' something else will or did happen/exist. It is a combination of the noun 間, and the case marking particle に.
When used with verbs or い-Adjectives, 間に will simply follow the verb/adjective. However, の will be required after nouns, while な will be required after な-Adjectives.
When 間に is being used to express the period/space 'until' something happens/exists, it will be paired with まで.
With 間に, the (B) action/location is usually something that can or did happen/exist at a 'specific' point during (A), and does/did not take up the whole time-frame/space of (A). In this way, it can translate more literally as 'in the span of (A)'. This comes from the kanji 間's common meaning as 'an interval'.
Related
Examples
--:--
いつも眠っている間に歯軋りをしてしまう。
I always grind my teeth while I'm asleep.
私が暇な間に、電話をかけてください。
Please call me while I am free.
仕事に行くまでの間に掃除したかったけど無理だった。
During the time that I had before going to work I wanted to clean, but it was not possible.
私が家にいる間に、電話をかけてください。
Please call me while I am at home.
僕が東京に行っていた5年の間に、彼は変わってしまった。
He had changed during the 5 years I was in Tokyo.
Get more example sentences!
Premium users get access to 12 example sentences on all Grammar Points.
Self-Study Sentences
Online
Difference between 間 and 間に
JStackExchange
Examples and formation
Core 6000
Offline
[DBJG] A Dictionary of Basic Japanese Grammar
Page 69
Genki II 1st Edition
Page 185
Genki II 2nd Edition
Page 216
Track Resources!
Bunpro tracks all of the resources you’ve visited, and offers relevant bookmarks of physical books to help with offline tracking.
の間に – Grammar Discussion
Most Recent Replies (27 in total)

darzington
Same, someone please help us and future readers!
仕事に行くまでのあいだに掃除したかったけど無理だった
Why is there a の between まで and あいだに here?

casual
In principle, Particle + の (JLPT N3) | Bunpro shows how の can be combined with other particles including まで. This turns the whole clause into a descriptor of the subsequent noun.
That article talks only about the construction (NounA)までの(NounB), but instead of NounA it works just as well with anything that works with まで, including verb phrases, i-adjectives and na-adjectives.
Without this の double particle construction, one cannot directly have a NounB after まで (see examples in Noun + まで (JLPT N5) | Bunpro and Verb + まで (JLPT N5) | Bunpro).
And so in this sentence の works to apply 「仕事に行くまで」 as a descriptor of noun あいだ:
仕事に行くまでのあいだ
the interval of time before going to work
darzington
Ah, thank you!
I’ve not reached that N3 grammar point yet, so I was pretty lost.