<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/howto-delete-users-created-by-bots-in-azure-ad-b2c-xqjf2yodn" -->

---
title: [HOWTO] Delete users created by bots in Azure AD B2C
description: Bot attacks on Azure AD B2C can exploit SMS/phone call MFA during sign-up to create thousands of fake accounts, incurring significant costs. To mitigate this,...
canonical: https://daily.dev/posts/howto-delete-users-created-by-bots-in-azure-ad-b2c-xqjf2yodn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: [HOWTO] Delete users created by bots in Azure AD B2C | daily.dev
og:description: Bot attacks on Azure AD B2C can exploit SMS/phone call MFA during sign-up to create thousands of fake accounts, incurring significant costs. To mitigate this,...
og:url: https://daily.dev/posts/howto-delete-users-created-by-bots-in-azure-ad-b2c-xqjf2yodn
og:image: https://api.daily.dev/og/posts/XQjF2yoDN.png
og:image:alt: [HOWTO] Delete users created by bots in Azure AD B2C
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# [HOWTO] Delete users created by bots in Azure AD B2C

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 3 min read · 0 upvotes · 0 comments

## Summary

Bot attacks on Azure AD B2C can exploit SMS/phone call MFA during sign-up to create thousands of fake accounts, incurring significant costs. To mitigate this, disabling SMS MFA in favor of TOTP, enabling bot protection (e.g., Cloudflare), or disabling sign-up entirely are recommended. For cleaning up bot-created accounts, a step-by-step guide walks through exporting affected users via the Azure portal, setting up an app registration with User Administrator role, and running a PowerShell script using the Microsoft Graph API batch endpoint to bulk-delete the users. The app registration should be deleted after use.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.rufer.be/2026/02/13/howto-delete-users-created-by-bots-in-azure-ad-b2c/>

## Similar posts on daily.dev

- [Microsoft Self-Service Password Reset abused in Azure data theft attacks](https://daily.dev/posts/microsoft-self-service-password-reset-abused-in-azure-data-theft-attacks-wzksyvp0l) · BleepingComputer · 0 upvotes · 0 comments
- [Enterprise-grade user account protection: Protecting local user accounts for compliance and operational continuity](https://daily.dev/posts/enterprise-grade-user-account-protection-protecting-local-user-accounts-for-compliance-and-operatio-pecp1uypw) · Dynatrace · 0 upvotes · 0 comments
- [Amazon Cognito adds admin API operation to reset user TOTP configurations](https://daily.dev/posts/amazon-cognito-adds-admin-api-operation-to-reset-user-totp-configurations-nfeigbs3v) · AWS · 0 upvotes · 0 comments
- [Announcing Cloudflare Account Abuse Protection: prevent fraudulent attacks from bots and humans](https://daily.dev/posts/announcing-cloudflare-account-abuse-protection-prevent-fraudulent-attacks-from-bots-and-humans-rrhciudwp) · Cloudflare · 0 upvotes · 0 comments
- [Password spraying attacks surge 155x as hackers exploit MFA gaps](https://daily.dev/posts/password-spraying-attacks-surge-155x-as-hackers-exploit-mfa-gaps-itszhorqa) · BleepingComputer · 0 upvotes · 0 comments

---

Tags: [#microsoft](https://daily.dev/tags/microsoft), [#powershell](https://daily.dev/tags/powershell)

[View this post on daily.dev](https://daily.dev/posts/howto-delete-users-created-by-bots-in-azure-ad-b2c-xqjf2yodn)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"[HOWTO] Delete users created by bots in Azure AD B2C","url":"https://daily.dev/posts/howto-delete-users-created-by-bots-in-azure-ad-b2c-xqjf2yodn","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/howto-delete-users-created-by-bots-in-azure-ad-b2c-xqjf2yodn"},"datePublished":"2026-02-28T23:42:38.002Z","dateModified":"2026-02-28T23:43:14.584Z","description":"Bot attacks on Azure AD B2C can exploit SMS/phone call MFA during sign-up to create thousands of fake accounts, incurring significant costs. To mitigate this,...","image":"https://i0.wp.com/blog.rufer.be/wp-content/uploads/2025/03/cropped-logo_blog.jpeg?fit=512%2C512&ssl=1","thumbnailUrl":"https://i0.wp.com/blog.rufer.be/wp-content/uploads/2025/03/cropped-logo_blog.jpeg?fit=512%2C512&ssl=1","isAccessibleForFree":true,"articleSection":"We Are .NET","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"We Are .NET","logo":"https://media.daily.dev/image/upload/s--BsnVOa3i--/f_auto/v1718347410/logos/wearedotnet","url":"https://daily.dev/sources/wearedotnet"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/howto-delete-users-created-by-bots-in-azure-ad-b2c-xqjf2yodn","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"microsoft,powershell","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"We Are .NET","item":"https://daily.dev/sources/wearedotnet"},{"@type":"ListItem","position":3,"name":"[HOWTO] Delete users created by bots in Azure AD B2C"}]}
```

