# Setting up ADFS as OIDC identity provider

**URL:** <https://forum.keycloak.org/t/setting-up-adfs-as-oidc-identity-provider/22501>\
**Category:** Configuring the server\
**Tags:** oidc\
**Created:** [June 6, 2023, 2:26am UTC](https://forum.keycloak.org/t/setting-up-adfs-as-oidc-identity-provider/22501 "2023-06-06T02:26:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doshishashin](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@doshishashin](https://forum.keycloak.org/u/doshishashin)\
**Post date:** [June 6, 2023, 2:26am UTC](https://forum.keycloak.org/t/setting-up-adfs-as-oidc-identity-provider/22501/1 "2023-06-06T02:26:53Z")

</div>

Hi, I am trying to integrate ADFS with Keycloak. Have followed the keycloak instructions to add Identity Provider but whenever I try to login to the console using ADFS its giving me the error “Unexpected error when authenticating with identity provider” and in the logs i can see below errors  
2023-06-06 10:19:51,464 WARN [org.keycloak.events] (executor-thread-407) type=IDENTITY\_PROVIDER\_LOGIN\_ERROR, realmId=6d20a2a6-761a-4445-83a7-8e201bb57c98, clientId=account-console, userId=null, ipAddress=10.0.151.80, error=identity\_provider\_login\_failure, code\_id=2ea6c7a2-a908-4699-8996-16d984c7f6b7, authSessionParentId=2ea6c7a2-a908-4699-8996-16d984c7f6b7, authSessionTabId=AU3vfDJkygQ.

I am not sure why Userid is null and i dont see any information about setting minimum claims for oidc/adfs.
