It would, I believe, be appreciated by developers if the authors could rewrite the last section "Register service principals in Exchange" in a more ordered way and with some elaboration of exactly what is being exemplified . While technically accurate, it assumes that developers know as much as the authors, especially about the logic of the flow of the final example.
And a few specific (picky!) details:
In New-ServicePrincipal … [-Organization <ORGANIZATION_ID>] it is unspecified under what conditions an Organisation_ID is needed or what its purpose is
In New-ServicePrincipal … -DisplayName "EXO Serviceprincipal for EntraAD App $($AADServicePrincipalDetails.Displayname) the argument of DisplayName is opaque and some clarification for mere mortals would be helpful
In $AADServicePrincipalDetails .... YourAppName I recollect (might be wrong) that YourAppName needs to be a quoted string
While we got CCF working quite quickly, it needed quite a lot of (unnecessary) guesswork.