MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
445 stars 155 forks source link

Group type (aad) not handled yet for Add-VSTeamGitRepositoryPermission #307

Open AnkitPathak41 opened 4 years ago

AnkitPathak41 commented 4 years ago

Please add the group type aad to be handled by the cmdlet Add-VSTeamGitRepositoryPermission, It is able to add the vsts groups, However does not work with aad groups.

Below is the output of the command when running the cmdlet with aad group type

Steps to reproduce

$OwnerPermission = @()
$OwnerPermission += "CreateBranch"

Add-VSTeamGitRepositoryPermission -Project $ProjectName  -RepositoryId $repoID -BranchName "master" -Group $groups  -Allow $OwnerPermission -Deny ManagePermissions 

Expected behavior

Actual behavior

Repository: https://github.com/DarqueWarrior/vsteam/issues

Environment data

OS

Server

> Get-VSTeamAPIVersion
Name                           Value                                                                                  
----                           -----                                                                                  
Release                        5.1-preview                                                                            
Version                        VSTS                                                                                   
MemberEntitlementManagement    5.1-preview                                                                            
TaskGroups                     5.1-preview.1                                                                          
DistributedTask                5.0-preview                                                                            
Core                           5.0                                                                                    
Packaging                      5.1-preview                                                                            
ServiceFabricEndpoint          5.0-preview                                                                            
VariableGroups                 5.0-preview.1                                                                          
Build                          5.1-preview                                                                            
Git                            5.1-preview                                                                            
ExtensionsManagement           5.1-preview                                                                            
Graph                          5.1-preview                                                                            
Tfvc                           5.0  
> 5.1.18362.752
SebastianSchuetze commented 4 years ago

Thank you for reporting. We gonna investigate this.

DarqueWarrior commented 4 years ago

Is this an issue or a feature request?

AnkitPathak41 commented 4 years ago

It is a feature request. As repository permissions only supports vsts type groups not Azure AD group

Is this an issue or a feature request?

DarqueWarrior commented 4 years ago

Looking at the docs this looks more like a request for the Azure DevOps team than this module. Once the API provides it we can offer it.

SebastianSchuetze commented 4 years ago

I am not really understanding that API with the permission. Where can you see that this must be added via API and cannot / should not be added via the module?

When I understand it, I would open a feature request and close this issue. Or we fix it in the module.