# Unable to create private location

**URL:** https://discuss.elastic.co/t/unable-to-create-private-location/386864
**Category:** Elastic Agent
**Tags:** fleet
**Created:** [June 15, 2026, 1:45pm UTC](https://discuss.elastic.co/t/unable-to-create-private-location/386864 "2026-06-15T13:45:57Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![rozling](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rozling/32/16401_2.png) [@rozling](https://discuss.elastic.co/u/rozling)
#### Post date: [June 16, 2026, 10:04am UTC](https://discuss.elastic.co/t/unable-to-create-private-location/386864/2 "2026-06-16T10:04:52Z")

</div>

Same issue here on self-managed ECK 9.4.2.

We’re trying to use Synthetics private locations for internal HTTPS / certificate monitoring. My understanding is that this _should_ be possible without Fleet Space Awareness / Enterprise, because we only need a private location on our own Elastic Agent in the default space.

We have:

- Fleet Server running

- Elastic Agent enrolled and online

- Agent assigned to the intended policy

- Synthetics available in Kibana

The blocker is creating the private location.

Based on the error message, `POST /api/private_locations` seems to validate that the requested private location's `spaces` are contained within the selected Fleet agent policy’s `space_ids`.

The problem is that on our 9.4.2 deployment, newly created Fleet policies don't get useful `space_ids`.

In the Fleet API they appear as `null` (effectively `[]`), even when you specify `space_ids` in the create request.

That seems to match your [other thread](https://discuss.elastic.co/t/newly-created-agent-policy-has-space-id-set-to-null-in-version-9-4-2/386845/3).

@leandrojmp mentions there that this is expected unless Fleet Space Awareness is enabled. But Fleet Space Awareness requires Enterprise, which we do not have.

That leaves us stuck:

- Creating a private location with `spaces: ["default"]` fails with:

```auto
Invalid spaces. Private location spaces [default] must be fully contained within agent policy <policy-id> spaces [].

```

- Creating a private location with `spaces` omitted fails with:

```auto
options.namespaces cannot be an empty array

```

The second case also seems to contradict the API docs, which say of the `spaces` parameter:

> If it is not provided, the private location is available in all spaces.

> **[Body Required - Create a private location | Kibana API documentation](https://www.elastic.co/docs/api/doc/kibana/operation/operation-post-private-location#operation-post-private-location-body-application-json-spaces)**
>
> Spaces method and path for this operation:
> post /s/{spaceid}/api/synthetics/privatelocations
> Refer to Spaces for more information.
> You must have all privileges for the Synt...

So it looks like private locations may currently be blocked on upgraded, non-space-aware Fleet deployments: the Synthetics API requires space alignment, but the Fleet policy has no usable `space_ids`, and enabling Fleet Space Awareness is not available on Basic.

Is this expected behaviour in 9.4.2, or a bug/regression in the private location validation for non-space-aware Fleet policies?

Happy to share the exact API payloads, Fleet policy response, Kibana logs etc if useful.

---

_[View the full topic](https://discuss.elastic.co/t/unable-to-create-private-location/386864)._
