I have tried to run the query using osquery manager on one of my agent
select * from users
However, no result is returned.
I got the below message from my agent logs
{"log.level":"warn","@timestamp":"2021-08-11T08:27:15.545-0700","log.logger":"elasticsearch","log.origin":{"file.name":"elasticsearch/client.go","file.line":405},"message":"Cannot index event publisher.Event{Content:beat.Event{Timestamp:time.Time{wall:0xc03d18f42d087974, ext:1437107101, loc:(*time.Location)(0x3ea4d40)}, Meta:{"raw_index":"logs-osquery_manager.result-default"}, Fields:{"action_data":{"id":"ca13e0cb-4755-410d-aa6f-49f4422ca950","query":"Select * from users"},"action_id":"51df55bd-b240-4bad-93cb-0b01f9126d4b","agent":{"ephemeral_id":"74eec063-134c-4ad5-9828-e5cd62d5c667","hostname":"RCA","id":"27e57477-317f-4e78-bb4f-ae67e4c83557","name":"RCA","type":"osquerybeat","version":"7.14.0"},"ecs":{"version":"1.10.0"},"elastic_agent":{"id":"27e57477-317f-4e78-bb4f-ae67e4c83557","snapshot":false,"version":"7.14.0"},"host":{"architecture":"x86_64","hostname":"RCA","id":"ac62cad1-78ec-47da-95e4-db96fecaa4f9","ip":["fe80::9097:6876:f9c4:c509","192.168.86.170"],"mac":["00:15:5d:0f:02:54"],"os":{"build":"17763.2061","family":"windows","kernel":"10.0.17763.2061 (WinBuild.160101.0800)","name":"Windows Server 2019 Standard Evaluation","platform":"windows","type":"windows","version":"10.0"}},"osquery":{"description":"Built-in account for administering the computer/domain","directory":"C:\\Users\\Administrator","gid":1000,"gid_signed":1000,"shell":"C:\\Windows\\system32\\cmd.exe","type":"local","uid":500,"uid_signed":500,"username":"Administrator","uuid":"S-1-5-21-3014340581-434985446-458634352-500"},"type":"RCA"}, Private:interface {}(nil), TimeSeries:false}, Flags:0x0, Cache:publisher.EventCache{m:common.MapStr(nil)}} (status=403): {"type":"security_exception","reason":"action [indices:admin/auto_create] is unauthorized for API key id [TfjCNXsBZgKK5Hs7miay] of user [elastic/fleet-server] on indices [logs-osquery_manager.result-default], this action is granted by the index privileges [auto_configure,create_index,manage,all]"}","service.name":"osquerybeat","event.dataset":"osquerybeat-json.log","ecs.version":"1.6.0"}
Any ideas how to resolve that?