I can't find this doxology in the lords prayer as recorded in
scripture
It is in the King James Version:
And lead us not into temptation, but deliver us from evil: For thine
is the kingdom, and the power, and the glory, for ever. Amen.
but the underlying Greek is missing in some manuscripts. Metzger's Textual Commentary on the Greek New Testament (2nd ed.) explains:
The ascription at the close of the Lord’s Prayer occurs in several
forms. In K L W Δ Θ Π f 13 al it is the familiar triple strophic form,
whereas the Sahidic and Fayyumic (like the form quoted in the Didache)
lack ἡ βασιλεία καί, the Curetonian Syriac lacks ἡ δύναμις καί, and
the Old Latin k reads simply “for thine is the power for ever and
ever.” Some Greek manuscripts expand “for ever” into “for ever and
ever,” and most of them add “amen.” Several late manuscripts (157 225
418) append a trinitarian ascription, “for thine is the kingdom and
the power and the glory of the Father and of the Son and of the Holy
Spirit for ever. Amen.” The same expansion occurs also at the close of
the Lord’s Prayer in the liturgy that is traditionally ascribed to St.
John Chrysostom.
The absence of any ascription in early and important representatives
of the Alexandrian (א B), the Western (D and most of the Old Latin),
and other (f 1) types of text, as well as early patristic commentaries
on the Lord’s Prayer (those of Tertullian, Origen, Cyprian), suggests
that an ascription, usually in a threefold form, was composed (perhaps
on the basis of 1 Chr 29:11–13) in order to adapt the Prayer for
liturgical use in the early church. Still later scribes added “of the
Father and of the Son and of the Holy Spirit.”
Since the phrase is omitted in the modern Critical Text of the Greek New Testament, many modern translations (e.g. NIV) omit the phrase as well. The RSV footnotes, "Other authorities, some ancient, add, in some form, For thine is the kingdom and the power and the glory, forever. Amen."
The phrase is included in the 1904 Patriarchal Text of Constantinople, which is an "official" version of sorts for the Greek Orthodox Church and Greek-speaking Orthodox jurisdictions and is very close to the so-called "Majority Text". The Patriarchal Text is based on copies of copies of copies of manuscripts that have been passed down over the centuries in various Orthodox monasteries (the Orthodox Church is not very fanatical about "autographs"). So we have kind of a weird situation in that the Greek-speaking churches mentioned in the New Testament that continue to exist today use a Biblical text that is considered less than authentic by non-Greek Bible scholars in the New World.
As Metzger implies, it is also found in the Liturgy of John Chrysostom. In the Eastern Orthodox tradition, the final doxology is usually spoken by the priest after the reader has completed the Lord's Prayer. We (Orthodox) do not normally say the doxology in our private prayers.