How to delete user profile from Mongo DB

Version 2
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    MyIT Digital Workplace


    COMPONENT:

    MyIT


    APPLIES TO:

    MyIT



    QUESTION:

    How to delete user profile from Mongo DB


    ANSWER:

    -Goto MyIT Server
    -Open command prompt 
    -Navigate to Mongo.exe path 
    -Delete user profile from following command 

    db.users.remove({"userId":"enteruseridhere"});

    For example as following  

    C:\>cd C:\Program Files\BMC Software\Smart_IT_MyIT\Smart_IT_MyIT\mongodb\bin 

    C:\Program Files\BMC Software\Smart_IT_MyIT\Smart_IT_MyIT\mongodb\bin>mongo.exe 
    MongoDB shell version: 3.0.6 
    connecting to: test 
    > use social 
    switched to db social 
    > db.users.remove({"userId":"Mary"}); 
    WriteResult({ "nRemoved" : 1 }) 
    > db.users.find({"userId":"Mary"}); 

      

     


    Article Number:

    000114514


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles