# Getting \_failed\_login\_count in cloud code

**URL:** <https://community.parseplatform.org/t/getting-failed-login-count-in-cloud-code/3777>\
**Category:** Uncategorized\
**Created:** [December 28, 2023, 12:51am UTC](https://community.parseplatform.org/t/getting-failed-login-count-in-cloud-code/3777 "2023-12-28T00:51:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![deelydian](https://community.parseplatform.org/user_avatar/community.parseplatform.org/deelydian/32/1682_2.png) [@deelydian](https://community.parseplatform.org/u/deelydian)\
**Post date:** [December 28, 2023, 12:51am UTC](https://community.parseplatform.org/t/getting-failed-login-count-in-cloud-code/3777/1 "2023-12-28T00:51:32Z")

</div>

I’m trying to access the \_failed\_login\_count using the masterKey in cloud code, and I am not able to do it. I have tried using “user.get(’\_failed\_login\_count’)” and “user.get(‘failedLoginCount’)” and neither of those get the count I can see in that field in MongoDB Compass.

I also found that I cannot see the failed attempts in the Parse Dashboard, so I’m guessing this is a protected field somehow? Is there a way to get access to the failed login attempts on the user object?

---

<div class="post-metadata">

**Author:** ![rgunindi](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rgunindi/32/1553_2.png) [@rgunindi](https://community.parseplatform.org/u/rgunindi)\
**Post date:** [December 28, 2023, 10:19am UTC](https://community.parseplatform.org/t/getting-failed-login-count-in-cloud-code/3777/2 "2023-12-28T10:19:13Z")

</div>

How could not you reach these fields in dashboard? Without MasterKey ?

---

<div class="post-metadata">

**Author:** ![deelydian](https://community.parseplatform.org/user_avatar/community.parseplatform.org/deelydian/32/1682_2.png) [@deelydian](https://community.parseplatform.org/u/deelydian)\
**Post date:** [January 5, 2024, 5:22pm UTC](https://community.parseplatform.org/t/getting-failed-login-count-in-cloud-code/3777/3 "2024-01-05T17:22:56Z")

</div>

Thank you for responding @rgunindi. I am using MasterKey in my cloud code when I try to get the “\_failed\_login\_count” field data. However, nothing gets returned.

I’m not sure what you mean about the dashboard. I have the dashboard set up so I can view all the data in our system, and the MasterKey is set in the “parse-dashboard-config.json” file.

---

<div class="post-metadata">

**Author:** ![rgunindi](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rgunindi/32/1553_2.png) [@rgunindi](https://community.parseplatform.org/u/rgunindi)\
**Post date:** [January 5, 2024, 6:59pm UTC](https://community.parseplatform.org/t/getting-failed-login-count-in-cloud-code/3777/4 "2024-01-05T18:59:38Z")

</div>

if you see data with parse-dashboard, you should reach data in your app. Because parse using same api

---

<div class="post-metadata">

**Author:** ![deelydian](https://community.parseplatform.org/user_avatar/community.parseplatform.org/deelydian/32/1682_2.png) [@deelydian](https://community.parseplatform.org/u/deelydian)\
**Post date:** [January 15, 2024, 11:04pm UTC](https://community.parseplatform.org/t/getting-failed-login-count-in-cloud-code/3777/5 "2024-01-15T23:04:38Z")

</div>

That’s what I thought too, but I’m not seeing any the “\_failed\_login\_count” field in the dashboard, and I can’t query that data in cloud code. Or I should say, when I query it in cloud code, the data I know exists in that field is not returned.

---

<div class="post-metadata">

**Author:** ![rgunindi](https://community.parseplatform.org/user_avatar/community.parseplatform.org/rgunindi/32/1553_2.png) [@rgunindi](https://community.parseplatform.org/u/rgunindi)\
**Post date:** [January 16, 2024, 12:37am UTC](https://community.parseplatform.org/t/getting-failed-login-count-in-cloud-code/3777/6 "2024-01-16T00:37:13Z")

</div>

If you prepare a test environment and push the github i will clone it and I will check the problem. You should put the enough code for test requirements
