remove member

Eid, Majed 0 Reputation points
2025-03-31T15:00:44.7533333+00:00

how to remove member in target group using sql azure portal

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Divyesh Govaerdhanan 3,120 Reputation points
    2025-03-31T16:11:44.9666667+00:00

    Hello,

    Welcome to Microsoft Q&A,

    Steps to Remove a User from a Role (Group) in Azure SQL

    🔹 Step 1: Open Azure Portal

    Navigate to your Azure SQL Database resource.

    🔹 Step 2: Open Query Editor

    In the SQL Database blade, go to "Query Editor (preview)".

    Login using SQL authentication (with a user that has permissions like dbo or is a member of securityadmin).

    🔹 Step 3: Run the sp_droprolemember Command

    Use the following T-SQL to remove a user from a database role:

    EXEC sp_droprolemember 'RoleName', 'UserName';
    

    📌 Replace:

    • RoleName → name of the database role (e.g. db_datareader, db_owner, or your custom role)
    • UserName → name of the user to remove
    EXEC sp_droprolemember 'db_datareader', 'john_doe';
    

    ℹ️ Notes:

    • This does not delete the user from the database

    Please Upvote and Accept the answer if it helps!!

    0 comments No comments

  2. Suwarna S Kale 1,831 Reputation points
    2025-03-31T16:19:39.4333333+00:00

    Hello Eid, Majed,

    Thank you for posting your question in the Microsoft Q&A forum. 

    It would help to provide with more info if you could elaborate on the problem and your current config a bit more, however, I am providing steps based on my understanding of the info you are looking for.

    The Azure Portal provides a user-friendly graphical interface for managing target groups. To remove a member from a target group, follow these steps: 

    1. Access the SQL Database Resource: Begin by logging into the Azure Portal and navigating to the specific SQL Database resource from which the target group member should be removed. 

    Locate the Elastic Job Agent: If the target group is associated with an Elastic Job Agent, select the "Elastic job agents" option from the left-hand menu. This will display a list of available job agents. 

    Select the Relevant Target Group: Under the "Job management" section, choose "Target groups" to view the configured groups. Click on the specific target group that contains the member to be removed. 

    1. Remove the Member: Navigate to the "Members" tab within the target group details. Here, all current members of the group will be listed. Identify the member to be removed and select the delete option (typically represented by a trash can icon). Confirm the action when prompted, and the member will be removed from the group. 

    This method is straightforward and does not require direct database access, making it suitable for administrators who prefer graphical tools over scripting. 

     

    If the above answer helped, please do not forget to "Accept Answer," as this may help other community members refer to the information if they face a similar issue. Your contribution to the Microsoft Q&A community is highly appreciated. 

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.