Saml2 fails when I try to use -Configure parameter

Product: PowerShell Universal
Version: 4.0.12

Hi,
I try to configure for Saml2 NameIdPolicy AllowCreate = “true” - but it’s failing.

I also tried the config like in the doc’s, but as soon as I add the -configure to the authentication.ps1

-Configure {
  $options = $args[0]
  $options.SPOptions.DiscoveryServiceUrl = 'https://idp.ironman.local/discovery'
}

I get:

No authentication handler is registered for the scheme 'Saml2'. The registered schemes are: Identity.External, Cookies, Bearer. Did you forget to call AddAuthentication().Add[SomeAuthHandler]("Saml2",...)?

without the -Configure Parameter it is working?