You need to create the application by using New-MgServicePrincipal -Appid "The app id you find in the logs"