-
Notifications
You must be signed in to change notification settings - Fork 46
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
Undocumented permissions for using AdditionalData to add group members #362
Comments
This issue has been assigned to you, @Jordanndahl. You are listed as the author for the document associated with this issue. If this is not correct, please take the following actions.
|
Thank you @erikly for raising this issue. What group type were you adding members to and that's the value of its isAssignableToRole property? |
The group type is
|
Thank you for the feedback @erikly. This seems to affect only the SDK - I can't replicate it through the REST API. Escalating to @andrueastman who understands more about SDKs to assist. Andrew, can you assist here? |
Here is the call to add the users.
|
Hey @erikly, Thanks for raising this. Do you have an issues if you change the sample on example 2 to this? GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var group = new Group
{
AdditionalData = new Dictionary<string, object>()
{
{"[email protected]", JsonDocument.Parse("[\"https://graph.microsoft.com/v1.0/directoryObjects/{id}\",\"https://graph.microsoft.com/v1.0/directoryObjects/{id}\",\"https://graph.microsoft.com/v1.0/directoryObjects/{id}\"]")}
}
};
await graphClient.Groups["{group-id}"]
.Request()
.UpdateAsync(group); |
Hi, Yes, I get the same error. I am using the latest client (4.19) on .NET 6, if that's relevant. |
Hey @FaithOmbongi, Just to confirm, do you also need to add the |
Hi @andrueastman, not in this instance. I revoked the previously consented permissions and tested with only |
Bumping this @andrueastman. Kindly advise if this is still an issue. Recap summary - Bulk add members through the API should work with |
Update: Updated the issue title for better search and visibility. |
Transferring to microsoft-graph-devx-api repository. |
When adding users in bulk as in Example 2 (using AdditionalData) using Delegated Permissions, I get the following error
unless I grant the app Directory.AccessAsUser.All (Delegated). However, this is not mentioned in the documentation. I only tried it because it was mentioned in the answer to this question on StackOverflow. Adding users as in Example 1 works without this permission.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: