Close Menu
Altcoinvest
    What's Hot

    SpaceX rocket booster to collide with moon overnight

    August 6, 2026

    Meta Debuts AI Coding Agent Muse: Here’s How It Compares to Claude Code and Codex

    August 6, 2026

    Coldcard attacker holds 1,159 BTC as mixing starts

    August 6, 2026
    Facebook X (Twitter) Instagram
    Altcoinvest
    • Bitcoin
    • Altcoins
    • Exchanges
    • Youtube
    • Crypto Wallets
    • Learn Crypto
    • bitcoinBitcoin(BTC)$64,489.000.30%
    • ethereumEthereum(ETH)$1,895.171.30%
    • tetherTether(USDT)$1.000.00%
    • binancecoinBNB(BNB)$593.49-1.80%
    • usd-coinUSDC(USDC)$1.000.00%
    • rippleXRP(XRP)$1.05-2.50%
    • solanaSolana(SOL)$73.45-0.90%
    • tronTRON(TRX)$0.3278680.40%
    • Figure HelocFigure Heloc(FIGR_HELOC)$1.033.00%
    • HyperliquidHyperliquid(HYPE)$56.171.30%
    Altcoinvest
    Home»Exchange»How to Force Remove Contact in Microsoft 365 with PowerShell
    How to Force Remove Contact in Microsoft 365 with PowerShell
    Exchange

    How to Force Remove Contact in Microsoft 365 with PowerShell

    May 6, 2025
    Share
    Facebook Twitter LinkedIn Pinterest Email

    We unsynced all the contacts from Active Directory on-premises. However, one contact is still available in Microsoft 365. When we want to remove it from the Microsoft 365 portal, it will not let us, and it fails with an error. In this article, you will learn how to force remove a contact in Microsoft 365 with PowerShell.

    Let’s look at what happens when we want to delete the contact in the Microsoft 365 admin center and what error appears.

    1. Sign in to the Microsoft 365 admin center
    2. Expand Users > Contacts
    3. Select the contact from the list
    4. Delete the contact
    Force remove contact in Microsoft 365 with Powershell admin centerForce remove contact in Microsoft 365 with Powershell admin center
    1. Click Delete
    Force remove contact in Microsoft 365 with Powershell deleteForce remove contact in Microsoft 365 with Powershell delete

    The delete contact failed error appears.

    The operation on Identity failed because it’s out of the current user’s write scope. The action ‘Remove-MailContact’, can’t be performed on the object because the object is being synchronized from your on-premises organization. This action should be performed on the object in your on-premises organization.

    Force remove contact in Microsoft 365 with Powershell failed errorForce remove contact in Microsoft 365 with Powershell failed error

    So what if you don’t have an on-premises organization anymore, and the contact is a leftover? Let’s look at the next step to force the removal of the contact.

    To force remove the contact in Microsoft 365 (Exchange Online) using PowerShell, follow these steps:

    Step 1. Install Microsoft Graph PowerShell

    Run Windows PowerShell as administrator and Install Microsoft Graph PowerShell.

    Install both the Microsoft Graph PowerShell and the beta version. That’s because you need to use the beta cmdlet to remove the contact.

    Install-Module Microsoft.Graph -Force
    Install-Module Microsoft.Graph.Beta -AllowClobber -Force

    Important: Always update to the latest Microsoft Graph PowerShell module version before you run a cmdlet or script to prevent errors and incorrect results.

    Step 2. Connect to Microsoft Graph PowerShell

    Connect to Microsoft Graph PowerShell.

    Connect-MgGraph -Scopes OrgContact.Read.All, Directory.ReadWrite.All, Directory.Read.All

    Enter your global administrator credentials and accept the Microsoft Graph permissions request.

    Step 3. Get all contacts in Microsoft 365 with PowerShell

    Run the Get-MgContact PowerShell cmdlet to get the contact. This will list all the contacts.

    Get-MgContact -All | Sort-Object DisplayName

    The output appears.

    DisplayName Id                                   Mail               MailNickname
    ----------- --                                   ----               ------------
    Contact1    f1e8a63b-6961-4548-b7ea-caca8c7e5d47 contact1@gmail.com contact1

    Now that you have the contact ID, you can double-check and run the command below to retrieve the contact.

    Get-MgContact -OrgContactId "f1e8a63b-6961-4548-b7ea-caca8c7e5d47"

    Let’s go to the next step and remove the contact in Microsoft 365.

    Step 4. Force remove contact in Microsoft 365 with PowerShell

    Run the command below to remove the contact permanently from Microsoft 365.

    Note: You must use the Remove-MgBetaContact cmdlet because this has not yet been ported to the stable release.

    Remove-MgBetaContact -OrgContactId "f1e8a63b-6961-4548-b7ea-caca8c7e5d47"

    Step 5. Verify your work

    Check that the contact is removed.

    Get-MgContact -OrgContactId "f1e8a63b-6961-4548-b7ea-caca8c7e5d47"

    The contact is removed successfully and no longer appears in the Microsoft 365 admin center.

    Force remove contact in Microsoft 365 with Powershell verifyForce remove contact in Microsoft 365 with Powershell verify

    That’s it!

    Read more: Hard delete mailbox without deleting user account in Microsoft 365 »

    Conclusion

    You learned how to force remove a contact in Microsoft 365 with PowerShell. The only method to force remove the contact is to use the Microsoft Graph PowerShell cmdlet. It’s not possible with the Exchange Online PowerShell cmdlets. Remember that you need to install the Microsoft Graph Beta module to be able to use the cmdlet and remove the contact.

    Did you enjoy this article? You may also like Block sign-in from shared mailboxes. Don’t forget to follow us and share this article.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    How to Remove OneDrive Photos App

    August 3, 2026

    MVPs around the World (2026)

    August 3, 2026

    Security Updates Exchange 2016-SE (Jul2026)

    July 15, 2026

    Exchange Server 2016 & 2019 to Microsoft 365 migration guide

    July 14, 2026
    Add A Comment

    Comments are closed.

    Tweets by InfoAltcoinvest

    Top Posts

    How to Remove OneDrive Photos App

    August 3, 2026

    MVPs around the World (2026)

    August 3, 2026

    Security Updates Exchange 2016-SE (Jul2026)

    July 15, 2026

    XRP DAILY ANALYSIS – RIPPLE XRP PRICE PREDICTION – RIPPLE XRP 2023 – RIPPLE ANALYSIS

    July 24, 2026

    Payward joins US Tech Force to bring crypto-grade security and blockchain expertise to federal modernization

    June 14, 2026

    Bitcoin Volatility Spikes as Trump Brags for Hitting Big Targets in Iran

    March 30, 2026

    Amboss Unveils RailsX: Lightning DEX Connects Bitcoin to $9.5 Trillion FX Market

    January 31, 2026

    Altcoinvest is a leading platform dedicated to providing the latest news and insights on the dynamic world of cryptocurrencies.

    We're social. Connect with us:

    Facebook X (Twitter)
    Top Insights

    SpaceX rocket booster to collide with moon overnight

    August 6, 2026

    Meta Debuts AI Coding Agent Muse: Here’s How It Compares to Claude Code and Codex

    August 6, 2026

    Coldcard attacker holds 1,159 BTC as mixing starts

    August 6, 2026
    Get Informed

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.


    Facebook X (Twitter)
    • Home
    • About us
    • Contact Us
    • Privacy Policy
    • Terms & Conditions
    © 2026 altcoinvest.com

    Type above and press Enter to search. Press Esc to cancel.