Librenms integrate with Azure OAuth 2.0

Hi there,

I am trying integrate our Librenms with Azure OAuth. Our Librenms is https but it is for internal network access only (not a public site).

I have followed the doc: Oauth/SAML support - LibreNMS Docs.

I have Login with Microsoft on login page now, and goes to Azure login page is fine as well. But after that, it is showing “Invalid credential”.

Call back address: has been setup in .env and App registrations already.

When I try to open, it shows “Whoops, something wrong message”, librenms.log is showing:
[2022-10-10T13:10:43.057771+13:00] production.ERROR: {“exception”:"[object] (Laravel\Socialite\Two\InvalidStateException(code: 0): at /opt/librenms/vendor/socialiteproviders/manager/src/O

Run trouble shooting command:
librenms@NQAKDVMSNM01:~$ lnms config:get auth.socialite
“redirect”: false,
“register”: false,
“configs”: {
“microsoft”: {
“client_id”: “2f4axxxxxxxxxxxxxxx”,
“client_secret”: “vKwxxxxxxxxxxxxxxxxxx”,
“tenant”: “a16xxxxxxxxxxxxxxxxxxxxxx”,
“listener”: “\SocialiteProviders\Microsoft\MicrosoftExtendSocialite”

Can anyone please give me an advice, thank you

Jeff Deng

You need to allow register probably, you can disable it later

Thank you my friend, it is working now after I set “register” as true.

Jeff Deng

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.