# How to login adfs using API

**URL:** <https://community.auth0.com/t/how-to-login-adfs-using-api/8595>\
**Category:** Get Help\
**Tags:** adfs, api-authorization, login-auth0\
**Created:** [October 26, 2017, 8:21pm UTC](https://community.auth0.com/t/how-to-login-adfs-using-api/8595 "2017-10-26T20:21:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![satinder.kaur](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@satinder.kaur](https://community.auth0.com/u/satinder.kaur)\
**Post date:** [October 26, 2017, 8:21pm UTC](https://community.auth0.com/t/how-to-login-adfs-using-api/8595/1 "2017-10-26T20:21:49Z")

</div>

I am trying to login to adfs using auth0 api .  
my api url is - [https://oneclick.au.auth0.com/oauth/token](https://oneclick.au.auth0.com/oauth/token)  
and the data i am sending is  
{  
“grant\_type”:“[http://auth0.com/oauth/grant-type/password-realm](http://auth0.com/oauth/grant-type/password-realm)”,  
“realm”:“Username-Password-Authentication”,  
“username”: “_**",  
“password”: "**",  
“scope”: “openid offline\_access”,  
“client\_id”: "__**…",  
“client\_secret”: "**_\*\*\*\*…”  
}  
but i am gettting erto  
“error”: “invalid\_grant”,  
“error\_description”: “Wrong email or password.”

while i am able to login with the same credential from auth0 login popup.  
also i am not able to found correct way for how to use the API.  
so please tell me am i doing right or some thing else i should use.  
please reply as soon as possible.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:57am UTC](https://community.auth0.com/t/how-to-login-adfs-using-api/8595/2 "2018-03-02T05:57:10Z")

</div>


