-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove-MgGroupMemberByRef 2.17.0 missing DirectoryObjectId parameter #2670
Comments
I'm facing the same problem. |
I am on 2.17 (psversion 5.1) and also have the issue. |
Hello @lorisAmbrozzo @WillPowerIsAll thank you for reporting this issue. After checking the paths in the open API file provided by the Microsoft Graph API owner, I noticed that Further checks revealed that the API endpoint containing the missing parameter is There for the correct cmdlets to use are |
Thank you, Remove-MgGroupMemberDirectoryObjectByRef is working nicely. |
Is it normal for such backwards incompatible changes to be made to Graph without mentioning it in any release notes? |
@LeonarddeR Thanks for seeking further clarity on this matter. To answer your question. No, it's not normal. I have gone through their change log once again and unfortunately was not able to trace the changes related to this particular issue. I will follow up with the API owner on this issue. |
Still seeing this in our Azure automation and the modules haven't been updated yet. |
I don't get why the issue is closed. The version 2.17.0 still does not have the DirectoryObjectId parameter and the documentation is still not up to date. Can you tel me where the correct cmdlet (Remove-MgGroupMemberDirectoryObjectByRef) is documented? |
Fantastic work, thank you, this works for me. Must be a recent change within the last 2 months because the old command used to work for me at that time. |
I am trying to use the Remove-MgGroupMemberDirectoryObjectByRef -GroupId $groupId -DirectoryObjectId $userId to remove users from a group. It works fine when using an account that has global admin permissions but using a service principal with (GroupMember.ReadWrite.All Directory.ReadWrite.All, Group.ReadWrite.All) I get error "Insufficient privileges to complete the operation" What other permissions is required? |
Same issue. I have 'UserAuthenticationMethod.ReadWrite.All','User.ReadWrite.All','GroupMember.ReadWrite.All','Group.ReadWrite.All','Directory.ReadWrite.All' and none of them let me use the command. Worth saying I am using a Global Admin account. |
Noticed that the cmdlet has changed with 2.18.0 to Remove-MgGroupMemberDirectoryObjectByRef, noted by samuelt81 If this cmdlet has changed, that means a lot of rewriting of runbooks. I could understand this with a major version change, but a point version seems a bit rediculous. |
Describe the bug
The Microsoft.Graph.Groups 2.16.0 have the -DirectoryObjectId parameter.
To Reproduce
Steps to reproduce the behavior:
Install-Module -Name Microsoft.Graph -MaximumVersion 2.17.0 -Force -Confirm:$false -Scope CurrentUser
Connect-MgGraph -Scopes "User.Read.All", "Group.Read.All", "GroupMember.Read.All", "GroupMember.ReadWrite.All"
Remove-MgGroupMemberByRef -GroupId 123 -DirectoryObjectId
Remove-MgGroupMemberByRef: A parameter cannot be found that matches parameter name 'DirectoryObjectId'.
Expected behavior
Module Version
Environment Data
Screenshots
![MgGraphError](https://private-user-images.githubusercontent.com/166463196/320693665-16788add-7b98-493d-a3a3-94cafc5cfc79.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NjY5NzcsIm5iZiI6MTczOTY2NjY3NywicGF0aCI6Ii8xNjY0NjMxOTYvMzIwNjkzNjY1LTE2Nzg4YWRkLTdiOTgtNDkzZC1hM2EzLTk0Y2FmYzVjZmM3OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQwMDQ0MzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yZWFhZWQyMmQxMDdlNmMxOTI1ZDNlMzkyYWI0ZGRiYTVhNzlhZTViMzUwNmM3NmY3OTM0OGI3YjUwZjdiZWZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.6T1G4NrfaOCObm5IK2YnpGFsr5jQcgxujDEEhqM6Cpc)
The text was updated successfully, but these errors were encountered: