ElHoussaineEl_Hila | 2023-11-03 16:13:31 UTC | #1
Hi,
When i call PostGroupsSearchAsync with this body: var body = new GroupSearchRequest() { PageSize = 100, PageNumber = 1, Query = new List<GroupSearchCriteria> { new GroupSearchCriteria { Values = groups?.ToList(), Type = GroupSearchCriteria.TypeEnum.Exact, Fields = new List<string> { "name" } } } }; It returns an empty result, however the same request got not empty results on the Api Explorer UI. Did i miss some thing in my code? or is there an issue on the .Net SDK?
tim.smith | 2023-11-03 16:17:39 UTC | #2
Are you using client credentials in your .net app? Group visibility is tied to users, so you may not be able to see what you would expect for a user when using non-user authorization.
If you need confirmation why the data is missing, please open a case with Genesys Cloud Care to investigate as we do not have access to your org's data via the forum to investigate missing data.
ElHoussaineEl_Hila | 2023-11-03 16:41:21 UTC | #3
Hello, You'are right, it's about visibility of the group, when i make it public i got results. My question now is: witch permission i need in my client credentials to be able to seach any group of my orgnization? in the api documentation it is not mentionned: No permissions required thanks
tim.smith | 2023-11-03 16:46:02 UTC | #4
ElHoussaineEl_Hila, post:3, topic:22919
in the api documentation it is not mentionned: No permissions required
That's correct, groups aren't controlled by permissions. For non-public groups, a user can only see them if that user is a member. If you're not using user-based authorization, you can't see any private groups. You'll need to switch to a user-based OAuth grant type, which is literally any of them that aren't client credentials. There's an OAuth browser component on nuget to help with that implementation if you're building a desktop app. If you're building a server-side ASP.NET app, use the auth code grant.
system | 2023-12-04 16:46:17 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 22919