Close Menu
Altcoinvest
    What's Hot

    50,640 People Affected After Hackers Hit Healthcare Firm, Stealing Personal, Financial and Medical Data

    April 18, 2026

    Kelp DAO exploited for $292 million with wrapped ether stranded across 20 chains

    April 18, 2026

    Ethereum Signals Major Reversal – $2,900 Target Back In Focus

    April 18, 2026
    Facebook X (Twitter) Instagram
    Altcoinvest
    • Bitcoin
    • Altcoins
    • Exchanges
    • Youtube
    • Crypto Wallets
    • Learn Crypto
    • bitcoinBitcoin(BTC)$75,669.00-2.39%
    • ethereumEthereum(ETH)$2,350.41-3.32%
    • tetherTether(USDT)$1.000.01%
    • rippleXRP(XRP)$1.43-3.48%
    • binancecoinBNB(BNB)$630.32-2.03%
    • usd-coinUSDC(USDC)$1.00-0.01%
    • solanaSolana(SOL)$86.05-3.58%
    • tronTRON(TRX)$0.3293720.58%
    • Figure HelocFigure Heloc(FIGR_HELOC)$1.041.31%
    • dogecoinDogecoin(DOGE)$0.095015-5.18%
    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 Block Soft and Hard Match in Microsoft Entra ID

    April 7, 2026

    How to connect to Microsoft 365 with Microsoft Graph PowerShell

    March 27, 2026

    February 2026 Exchange Server Security Updates

    March 5, 2026

    How to Fix 550 5.1.10 RESOLVER.ADR.RecipientNotFound in Exchange Server

    March 5, 2026
    Add A Comment

    Comments are closed.

    Tweets by InfoAltcoinvest

    Top Posts

    How to Block Soft and Hard Match in Microsoft Entra ID

    April 7, 2026

    How to connect to Microsoft 365 with Microsoft Graph PowerShell

    March 27, 2026

    February 2026 Exchange Server Security Updates

    March 5, 2026

    BlockDAG Sparks 400× Potential Before March 4 Trading as Uniswap Price Consolidates, and Tron Price Stalls

    February 19, 2026

    Ripple Partner SBI Issues 10 Million Yen On-Chain Bonds Doling Out XRP Rewards To Investors ⋆ ZyCrypto

    February 23, 2026

    Bitcoin Miner Cango Sells $305M in BTC to Fund AI Pivot

    February 11, 2026

    Relief Rally Leads To Green Bitcoin, Altcoin Charts, But Will It Last?

    February 2, 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

    50,640 People Affected After Hackers Hit Healthcare Firm, Stealing Personal, Financial and Medical Data

    April 18, 2026

    Kelp DAO exploited for $292 million with wrapped ether stranded across 20 chains

    April 18, 2026

    Ethereum Signals Major Reversal – $2,900 Target Back In Focus

    April 18, 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.