# SSO internal error issue when connecting to Azure/ActiveDirectory

**URL:** <https://forum.mautic.org/t/sso-internal-error-issue-when-connecting-to-azure-activedirectory/30601>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [January 22, 2024, 11:12am UTC](https://forum.mautic.org/t/sso-internal-error-issue-when-connecting-to-azure-activedirectory/30601 "2024-01-22T11:12:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aetienne.mha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aetienne.mha/32/12824_2.png) [@aetienne.mha](https://forum.mautic.org/u/aetienne.mha)\
**Post date:** [January 22, 2024, 11:12am UTC](https://forum.mautic.org/t/sso-internal-error-issue-when-connecting-to-azure-activedirectory/30601/1 "2024-01-22T11:12:25Z")

</div>

**Your software**  
My Mautic version is: 5.0.1  
My PHP version is: 8.1.26  
My Database type and version is:

**Your problem**  
My problem is:

We’ve followed the instructions within the documentation ([https://docs.mautic.org/en/4.x/authentication/authentication.html](https://docs.mautic.org/en/4.x/authentication/authentication.html)) for setting up the SSO connect with active directory/azure but then encounter and internal 500 error.

These errors are showing in the log:

[2024-01-18 13:13:33] mautic.WARNING: PHP Warning - openssl\_sign(): Supplied key param cannot be coerced into a private key - in file /home/mha-mauticstaging/htdocs/html/vendor/robrichards/xmlseclibs/src/XMLSecurityKey.php - at line 563 {“hostname”:“ip-172-31-32-133”,“pid”:849076}

[2024-01-18 13:13:33] mautic.CRITICAL: Uncaught PHP Exception Exception: “Failure Signing Data: error:1E08010C:DECODER routines::unsupported - SHA256” at /home/mha-mauticstaging/htdocs/html/vendor/robrichards/xmlseclibs/src/XMLSecurityKey.php line 564 {“exception”:“[object] (Exception(code: 0): Failure Signing Data: error:1E08010C:DECODER routines::unsupported - SHA256 at /home/mha-mauticstaging/htdocs/html/vendor/robrichards/xmlseclibs/src/XMLSecurityKey.php:564)”} {“hostname”:“ip-172-31-32-133”,“pid”:849076}

Steps I have tried to fix the problem:

1. Cleared cache
2. Created a new project within Azure, followed the SSO instructions again and ended with the same result.
3. Created a new server instance, clean Mautic 4 and 5 install and immediate test of SSO following instructions from the documentation and same result

---

<div class="post-metadata">

**Author:** ![aetienne.mha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/aetienne.mha/32/12824_2.png) [@aetienne.mha](https://forum.mautic.org/u/aetienne.mha)\
**Post date:** [February 7, 2024, 11:56am UTC](https://forum.mautic.org/t/sso-internal-error-issue-when-connecting-to-azure-activedirectory/30601/2 "2024-02-07T11:56:15Z")

</div>

Update: Updated the platform to 5.0.3 php version 8.1.27 and updated the metadata.xml.

Now receiving an internal 500 error with the error log showing:

```auto
[2024-02-07T11:49:12.565895+00:00] mautic.CRITICAL: Uncaught PHP Exception ArgumentCountError: "LightSaml\SpBundle\Controller\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed" at /home/mha-mauticstaging/htdocs/html/vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php line 29 {"exception":"[object] (ArgumentCountError(code: 0): LightSaml\\SpBundle\\Controller\\DefaultController::__construct(): Argument #1 ($metadataProfileBuilder) not passed at /home/mha-mauticstaging/htdocs/html/vendor/lightsaml/sp-bundle/src/LightSaml/SpBundle/Controller/DefaultController.php:29)"} {"hostname":"ip-172-31-32-133","pid":1384581}
```
