Hey, so consider like I am logged into some user and I don't know which user enrolled the device, is there a way I can find the SID of the user that enrolled the device
Get the SID of currently enrolled user from Registry
Hi,
Is there a way I can get the SID of a currently enrolled user from registry.
I found this Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments\499B59E9-637E-493D-91D8-9A5FE2D5B450 registry key which contains the SID.
But I somehow also have another 8FB7D64E-70FC-4F9D-89EE-D486817534DF, which also contains some enrollment details of some other user.
Is there a way I can distinguish between them?
With regards
Bevan
2 answers
Sort by: Most helpful
-
-
Xenia-MSFT 3,750 Reputation points Microsoft Vendor
2024-06-14T02:29:35.4233333+00:00 @Bevan Thomas Thanks for posting in our Q&A.
For this issue, we can see the enrolled user account in Settings > Accounts > Access work or school. We can run the following commend in PowerShell to find the target Azure AD user's objectID.
Install-Module AzureAD connect-AzureAD Get-AzureADUser
Then we can refer to the following link to covert Azure AD objectID to SID.
https://oliverkieselbach.com/2020/05/13/powershell-helpers-to-convert-azure-ad-object-ids-and-sids/
Note: Non-Microsoft link, just for the reference.
Hope it will help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.