How to remove a disabled Microsoft Entra user's device from Intune - Intune (2024)

  • Article

This article explains how to remove an orphaned device in Intune if its owner has been deleted from Microsoft Entra ID. In this scenario, the device's user principal name (UPN) in Intune is listed as None.

Symptoms

If you view an enrolled device in the Microsoft Intune admin center under Devices > All Devices, you see that the UPN is None.

Cause

This issue occurs when an administrator removes or deletes a user from Microsoft Entra ID, before deleting their enrolled device in Microsoft Intune. Once the user is removed from Microsoft Entra ID, the Intune information for that user becomes unavailable and the UPN for their enrolled device shows None.

Solution

A script is available that removes an orphaned, Intune-managed device if the owner was removed from Microsoft Entra ID. The script requires that you have the UPN of the active or deleted user. You can download the script (RemoveIntuneDevice.ps1) from the following Microsoft website:
https://github.com/patlewis-MSFT/RemoveIntuneDevice

Prerequisites

  • The Microsoft Entra ID recycle bin must be enabled before you delete a device for a deleted user. Read more about Microsoft Entra Connect Sync: Enable AD recycle bin.

  • The logged-on user must have the appropriate Graph permissions set up in Intune before you run the script. For more information, see the Intune permission scopes section of How to use Microsoft Entra ID to access the Intune APIs in Microsoft Graph.

  • Install the Microsoft Graph PowerShell module by running Install-Module Microsoft.Graph or Install-Module Microsoft.Graph.Beta at an elevated PowerShell prompt.

  • You must have an Intune tenant that supports the Azure portal by having a production or trial license. Read more about Introduction to Microsoft Intune in the Azure portal.

  • Using the Microsoft Graph APIs to configure Intune controls and policies requires an Intune license.

  • You must have an account that has permissions to administer the Intune Service.

  • You must be using PowerShell 5.0 on Windows 10 x64 (PowerShell 4.0 is a minimum requirement for the scripts to function correctly.)

    Note

    For PowerShell 4.0, you must have the PowershellGet module to enable using the Install-Module functionality. A first-time use of these scripts requires a Global Administrator of the tenant to accept the permissions of the application.

  • If you receive an error message that states that scripts are disabled on your computer, you have to enable the script to run by running the Set-ExecutionPolicy cmdlet. For more information, see Set-ExecutionPolicy.

Run the script

After the prerequisites are installed or met, follow these steps to use the script:

  1. Download the RemoveIntuneDevice.ps1 script file to your local Windows computer.
  2. Run PowerShell at an elevated administrator account.
  3. Browse to the folder where you copied RemoveIntuneDevice.ps1, and then type: .\RemoveIntuneDevice.ps1.
  4. Follow the prompts for authentication and to get the UPN of the owner or previous owner's device.

Feedback

Was this page helpful?

Feedback

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.

Submit and view feedback for

How to remove a disabled Microsoft Entra user's device from Intune - Intune (2024)
Top Articles
Investing in real estate in the Netherlands
2024 Analyst Outlook: Jussi Askola On Being Selective With REITs, Dividend Investing
Corgsky Puppies For Sale
Jimmy Johns Delivery Hours
Missing 2023 Showtimes Near Amc Classic Florence 12
This Modern World Daily Kos
Davaba19
Best Jewelry Laser Engraving Machine to Elevate Your Design
Espn Transfer Portal Basketball
O'Quinn Peebles Phillips Funeral Home
In a nutshell - About UM
The Meaning Behind The Song: Waymore's Blues by Waylon Jennings - Beat Crave
Uwa Schedule
manhattan cars & trucks - by owner - craigslist
Ellaeats Tumblr
Unterschied zwischen ebay und ebay Kleinanzeigen: Tipps, Vor- und Nachteile
Shoulder Ride Deviantart
2406982423
Itawamba Ixl
Francine weakens moving inland as the storm leaves behind flooding and widespread power outages
Albany Want Ad Digest
Unveiling The Fascination: Makayla Campinos Video
Bowser's Fury Coloring Page
Softball History: Timeline & How it started
Standard Specification for Annealed or Cold-Worked Austenitic Stainless Steel Sheet, Strip, Plate, and Flat Bar
Elemental Showtimes Near Regal White Oak
Daves Supermarket Weekly Ad
Knock At The Cabin Showtimes Near Alamo Drafthouse Raleigh
The Bold And The Beautiful Soap Hub
Manchester City Totalsportek
Dimbleby Funeral Home
Visit.lasd
Indiana Immediate Care.webpay.md
100K NOTES - [DEEPWOKEN - DEEP WOKEN - ROBLOX] | ID 217435304 | PlayerAuctions
"Lebst du noch?" Roma organisieren Hilfe für die Ukraine – DW – 05.03.2022
Usm.instructure
101 Riddles for Adults That Will Test Your Smarts
Find your used roadbike, gravel Bike & MTB | buycycle UK
Delta Incoming Flights Msp
9294027542
Mcoc Black Panther
Vadoc Gtlvisitme App
Kens5 Great Day Sa
Amariah Morales Snapchat
Norville Breast Center At Alamance Regional
Easy Pickled Coleslaw (with Canning Video)
Obtaining __________ Is A Major And Critical Closure Activity.
A look back at the history of the Capital One Tower
'Selling Sunset' star Alanna Gold said she owned a California desert town. Now, she says she doesn't.
Auctionzipauctions
Milly Bobby Brown Nsfw
Lanipopvip
Latest Posts
Article information

Author: Barbera Armstrong

Last Updated:

Views: 6134

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Barbera Armstrong

Birthday: 1992-09-12

Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

Phone: +5026838435397

Job: National Engineer

Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.