diff --git a/pkg/group/manager/json/json.go b/pkg/group/manager/json/json.go index ad4a425dd6f..a5a976a287b 100644 --- a/pkg/group/manager/json/json.go +++ b/pkg/group/manager/json/json.go @@ -89,7 +89,7 @@ func New(m map[string]interface{}) (group.Manager, error) { func (m *manager) GetGroup(ctx context.Context, gid *grouppb.GroupId) (*grouppb.Group, error) { for _, g := range m.groups { - if g.Id.GetOpaqueId() == gid.OpaqueId || g.GroupName == gid.OpaqueId { + if (g.Id.GetOpaqueId() == gid.OpaqueId || g.GroupName == gid.OpaqueId) && (gid.Idp == "" || gid.Idp == g.Id.GetIdp()) { return g, nil } }