---
title: groupNames
framework: intents
role: symbol
role_heading: Instance Property
path: intents/insearchformessagesintent/groupnames
---

# groupNames

The names of any groups associated with the message.

## Declaration

```swift
var groupNames: [String]? { get }
```

## Discussion

Discussion When this property contains one or more NSString objects, your search should return only messages that sent to the specified groups. Use the operator in the groupNamesOperator property to determine whether to search for messages containing all, some, or none of the specified groups.

## See Also

### Deprecated Symbols

- [init(recipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:)](intents/insearchformessagesintent/init(recipients:senders:searchterms:attributes:datetimerange:identifiers:notificationidentifiers:speakablegroupnames:).md)
- [init(recipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:groupNames:)](intents/insearchformessagesintent/init(recipients:senders:searchterms:attributes:datetimerange:identifiers:notificationidentifiers:groupnames:).md)
- [groupNamesOperator](intents/insearchformessagesintent/groupnamesoperator.md)
