Custom Role in Azure DevOps to allow Add Users - azure-devops

Is it possible to provide a reduced set of permissions to allow a user permission to add other users to a project without being a full blown administrator? Adding a user as a Project Admin provides to more access which is a huge security issue.

You could add user as contributor or Project Valid Users with limited access. Please see Project-level groups
Contributors: Has permissions to contribute fully to the project code base and work item tracking. The main permissions they don't have are those that manage or administer resources.
Project Valid Users: Has permissions to access and view project information.
Besides, you could also create a custom group to grant or restrict permissions in project setting >> permission >> new group. Then, change permission for the group.

Related

What NameSpace, NameSpaceID, Token and/or bit will give permission to Project Admins to add/Remove users (Any Permissions/AzureDevops gurus?))

Is there someone who knows the NameSpace, NameSpaceID and/or Token and/or bit value that gives Project Admins in Azure DevOps permissions to add and remove users. I know only Project Admins have that permissions and other Decurity Groups don't have that permissions.
I know you can find all the NameSpaces here.
These are the different level of Namaspace.
Object-level
Project-level
Organization or collection-level
Server-level (on-premises only)
Role-based
Internal only
I cannot point out in "Internal Namespace and Permissions" which particular one prove that access. It is not obvious.
Does anyone know what NameSpace, NameSpaceID and/or Token and/or bit will give permission to Project Admins to add/Remove users.
Does anyone know what NameSpace, NameSpaceID and/or Token and/or bit
will give permission to Project Admins to add/Remove users.
Project Administrators are granted all project-level permissions, have the highest permission of the project. You can't change the permission settings for the Project Administrators group. This is by design.
This is stated in the official document.
If you mean manage permissions to read, write, and delete user account identity information, manage group membership and create and restore identity scopes. Then you can check the Identity namespace.

How to deny Project Admins permission to manage user rights?

How to deny Project Administrators permission to manage user rights?
So that he keeps all the Admin rights in the Project, but can no longer add or delete users in the Project.
In the web portal, all rights of the Project Administrators group are grayed out. Despite the fact that I am Project Collection Admin.
I found a similar question: Prevent project admin from adding new user to project and organization in Azure DevOps?
But that answer only indicates that you should then not make the user a member of the Project Administrators group, but not how to give the user all Project Admin rights except manage user rights.
edit 13-04-2021
According to Hugh Lin - MSFT's answer you cannot take away the right to manage users from the Project Administrators group, you have to create a new group.
But, how can you give that new group the other rights of the Project Administrators (underlined on this picture)?
And you can see that the Project Administrators group is used in many places (at many object-level permissions), how does the new group get the same permissions in all those places?
Project Administrators are granted all project-level permissions, have the highest permission of the project. You can't change the permission settings for the Project Administrators group. This is by design.
This is stated in the official document.
So if you don't want a user in the Project Administrators to manage users right. You need to remove this user from the Project Administrators group. Add the user to a new project group and grant all permissions, set all permissions to Allow.
In the newly created custom group, we can only assign the permissions given in the list. Some permissions exclusive to the project administrator group cannot be granted.

Set approval process to delete any project or repos of Azure Devops

Set approval process to delete any project/repos of Azure DevOps(ADO).
I have multiple owners in my private Azure Devops. From the docs it appears that any individual owner/users can go rogue and delete the entire Azure project/repo from existence though i know it can be restore easily in Azure devops within 28 days, But still I'd like to prevent that from happening.
Is there any way to set up Azure Devops user/group permissions such that deleting the repo requires the approval of its owners ? Kindly suggest if I missed the Azure docs if this feature is already there ?
Making myself the sole owner is not a viable solution, as I want to prevent myself (or an unauthorised user of my account) from having this power, too. So need to implement the approval process for this.
From below SS you can see it is not expecting any approval while deleting the whole project.
I'm afraid there is no such feature to approve delete request. However, you can set the delete permission of users to deny.
Project:
If you want to delete a project, you must be a member of the Project Collection Administrators group or have the Delete team project permission set to Allow.
You can set this permission to deny if you don’t want other users to delete the project. Members in Project Administrators Group can manage permissions or groups at the project level and their delete project permission is allow by default.
Repositories:
You can set the delete repository permission of users to deny.
In addition, for most groups and almost all permissions, Deny overrides Allow. For members of the Project Collection Administrators or Team Foundation Administrators groups, Deny doesn't trump Allow.
Unfortunately, you read correctly. There isn't a way to require approval prior to repo deletion.
However, what you can do is create a group of users that you would want to be prevented from deleting repos and update the repo permissions to include an explicit deny for the "Delete Repository" permission:

Azure Devpos Server 2019 : How to correctly manage user role

I'am recently installed Azure DevOps Server 2019 in on-premises server.
However, i'am so confused : How i can set the security and the user permission in the server, such as : Deny user to view author project in the same collection , create custom group not in the azure devops default groups ...
I ask for idea to implement that
Thank you
According to Azure DevOps permission setting, most groups and almost all permissions, Deny trumps Allow. If a user belongs to two groups, and one of them has a specific permission set to Deny, that user will not be able to perform tasks that require that permission even if they belong to a group that has that permission set to Allow.
Deny user to view author project in the same collection.
Assume you were talking about team project. In your scenario, the simplest way is not add that user to your team project. People without team project collection admin permission will not be able to see those projects which they are not added in.
If you already add users in the team project and want the user not be able to see some info such as repo/build/work items in the project .
You need to evidently deny those users for viewing some project repositories/builds/ work items.
As how to create group, you could directly click New Group in the right top corner of the page from Project Settings-- Permission
More details about how are permissions and groups defined, suggest you go through our official doc here-- About permissions and groups
Besides, you could also manage user permission with the help of command line. The tfssecurity command line tool allows us to manage permissions for Azure DevOps groups and users. We could use it in a PowerShell script to grant access to projects that already exists.

Azure DevOps - permissions issue with deployment groups

Does anyone know where I can set the permission to manage deployment groups in Azure DevOps.
If i click on "deployment groups" in the menu shown here:
I am receiving this message when i click on a deployment group.
The error message states:
You do not have permissions to register targets. Contact your release
manager to grant permission
I am a member of both project administrators and build administrators groups.
I can reproduce your problem and solve it with the following permission settings.
Click Manage in the Deployment pool
If you get this error you do not have permission to manage this deployment pool's roles to prevent you from modifying permissions in Security. You need to be added to Project Collection Administrators group in organization setting permissions. If you can't be added to the PCA group, you can let the users in the PCA group help you modify it.
Set the user's Role to Administrator in Security, click Save Changes.
After this setting, you will not receive the error message:You do not have permissions to register targets. Contact your release manager to grant permission when you enter the Deployment groups.
This access is not required as I was able to fix this without changing org level access to others and indeed such access is not made to share with all.