<!--
{
  "availability" : [
    "iOS: 10.0.0 - 11.0.0",
    "iPadOS: 10.0.0 - 11.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.2.0 - 4.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INSearchForMessagesIntent/groupNames",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INSearchForMessagesIntent(py)groupNames"
  },
  "title" : "groupNames"
}
-->

# groupNames

The names of any groups associated with the message.

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

## Discussion

When this property contains one or more <doc://com.apple.documentation/documentation/Foundation/NSString> objects, your search should return only messages that sent to the specified groups. Use the operator in the [`groupNamesOperator`](/documentation/Intents/INSearchForMessagesIntent/groupNamesOperator) property to determine whether to search for messages containing all, some, or none of the specified groups.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)