# Reset our app user MFA with Management API

**URL:** <https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903>\
**Category:** Get Help\
**Tags:** mfa-api, management-api, mfa\
**Created:** [March 6, 2023, 2:52pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903 "2023-03-06T14:52:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmytro.demakov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dmytro.demakov/32/34723_2.png) [@dmytro.demakov](https://community.auth0.com/u/dmytro.demakov)\
**Post date:** [March 6, 2023, 2:52pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903/1 "2023-03-06T14:52:17Z")

</div>

We have an app and use Auth0 for users authentication. All users refers to the particular account in our system. For some of them MFA in enabled.  
So when they have no access to auth-provider (e.g. Google Authenticator), they ask our customer support to reset the MFA. To do this we need to go to the Auth0 app, find the particular user and reset MFA manually. ✅

It works fine but not very convenient for customers, so now we want to allow account admins to do it in our app (we already have functionality of users management).

I’ve found exactly what we need on [this page](https://auth0.com/docs/secure/multi-factor-authentication/reset-user-mfa#use-the-management-api). So we need to delete existing enrolments for the particular user one by one, seems pretty clear. 😃

And here the problems are coming. I need to use `/get_enrollments` endpoint, but there is no such endpoint 🤷‍♂️. Ok, there is another one pretty close to what we need:  
GET /api/v2/users/{id}/enrollments  
description: " Retrieve the first confirmed [Guardian](https://auth0.com/docs/multifactor-authentication/guardian) enrollment for a user".

This one works well (returns 200) but doesn’t return any data in response, just an empty array for the user which can log in only with Google Auth 🤷‍♂️. And now I don’t understand the problem is that this endpoint may be used only in Guardian case (but we don’t use it), OR it’s a wrong endpoint 🤔 or we misunderstand something…

Please assist 🙏

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 8, 2023, 3:40pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903/3 "2023-03-08T15:40:06Z")

</div>

Hi @dmytro.demakov,

Welcome to the Auth0 Community!

Could you use the `DELETE	/api/v2/users/{id}/authentication-methods` endpoint?

> **[Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Users/delete_authentication_methods)**

---

<div class="post-metadata">

**Author:** ![dmytro.demakov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dmytro.demakov/32/34723_2.png) [@dmytro.demakov](https://community.auth0.com/u/dmytro.demakov)\
**Post date:** [March 9, 2023, 2:07pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903/4 "2023-03-09T14:07:36Z")

</div>

Hey @dan.woda  
Thanks for the assistance.

Yes, I can call this endpoint, it returns 204 and basically everything looks absolutely fine:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/3/d/3d24e84f81568619322f51ee5c3c4f185779a435.jpeg)

BUT nothing has changed in the system when user logs in ☹

 ![image](https://global.discourse-cdn.com/auth0/original/3X/a/0/a05bbc09e05dff413be6f4fb208f4e717808bea7.png)

Maybe such weird behaviour we have because we’re using AFAIU a bit outdated `/oauth/ro` endpoint? 🤔

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 9, 2023, 2:20pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903/5 "2023-03-09T14:20:02Z")

</div>

I tested it, and that endpoint successfully clears a user’s MFA factors.

Are you still seeing MFA factors for your user after hitting that endpoint successfully?

> [@dmytro.demakov](#):
>
> Maybe such weird behaviour we have because we’re using AFAIU a bit outdated `/oauth/ro` endpoint? 🤔

That may be a factor, I’m not sure. That endpoint has been deprecated for more than 5 years (longer then I’ve worked here 😄), I would avoid it entirely. There is a replacement for that endpoint, more on that [here](https://auth0.com/docs/troubleshoot/product-lifecycle/past-migrations/migration-oauthro-oauthtoken).

---

<div class="post-metadata">

**Author:** ![dmytro.demakov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dmytro.demakov/32/34723_2.png) [@dmytro.demakov](https://community.auth0.com/u/dmytro.demakov)\
**Post date:** [March 9, 2023, 3:53pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903/6 "2023-03-09T15:53:47Z")

</div>

> Are you still seeing MFA factors for your user after hitting that endpoint successfully?

Well, I would say that it doesn’t return anything at all, no matter delete I something or not 🤷‍♂️  
To be honest, I didn’t see the case when any of these endpoints return anything in the body, but empty array `[]` 🤷‍♂️

 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/b/6bd740032a2ed8808bebca40b4a681504b4c97c1.jpeg)

Migration of auth process is out of scope for now.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 9, 2023, 3:56pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903/7 "2023-03-09T15:56:17Z")

</div>

Can you please share your tenant name and an example user with me in a DM?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 9, 2023, 5:25pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903/8 "2023-03-09T17:25:11Z")

</div>

It looks like this issue is related:

[https://community.auth0.com/t/user-profile-multifactor-attribute-not-changed-after-deleting-mfa-enrollments/89191](https://community.auth0.com/t/user-profile-multifactor-attribute-not-changed-after-deleting-mfa-enrollments/89191)

---

<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:** [April 24, 2023, 1:49pm UTC](https://community.auth0.com/t/reset-our-app-user-mfa-with-management-api/101903/9 "2023-04-24T13:49:51Z")

</div>

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