Ubuntu WARP - managed deployment not working (registration is not performed)

Hello every one.

I’ve checked forum, I saw similar cases but not the same.
I have a problem with managed deployment and client registration on Ubuntu 22.04.4 LTS.
The installed warp client version is 2024.4.133-1.
The installation was done with apt as it’s described here https://pkg.cloudflareclient.com/.
I created service token and followed the guide:
Service tokens · Cloudflare Zero Trust docs
and. this wone for creating right Device enrolment rules
Unable to use warp-cli on Ubuntu [Possible Bug] - #7 by james.mantz

My /var/lib/cloudflare-warp/mdm.xml is configured

<dict>
  <key>organization</key>
  <string>[team_name]</string>
  <key>auth_client_id</key>
  <string>[client_id_access]</string>
  <key>auth_client_secret</key>
  <string>[client secret]</string>
</dict>

but the client can not register.
In logs I see this error:

2024-06-03T13:05:30.202Z  INFO warp::warp_service: Starting WarpService pid=11659
2024-06-03T13:05:30.202Z  INFO warp::warp_service: Version: 2024.4.133
2024-06-03T13:05:30.203Z ERROR warp::warp_service::ipc_cleanup: Could not read the WARP diag partials directory err=Os { code: 2, kind: NotFound, message: "No such file or directory" }
2024-06-03T13:05:30.203Z DEBUG warp_settings::raw_settings: Loading settings from file "/var/lib/cloudflare-warp/settings.json"
2024-06-03T13:05:30.204Z  INFO warp_settings::raw_settings::xml: Found single configuration in MDM file.
2024-06-03T13:05:30.204Z  INFO warp_settings::raw_settings::mdm: Found a single configuration in the original MDM file format
2024-06-03T13:05:30.204Z  INFO warp_settings::raw_settings::xml: Found single configuration in MDM file.
2024-06-03T13:05:30.205Z  INFO warp_settings::raw_settings::mdm: Found a single configuration in the original MDM file format
2024-06-03T13:05:30.205Z DEBUG warp_settings::manager: Starting local policy file watch parent_path="/var/lib/cloudflare-warp"
2024-06-03T13:05:30.208Z  INFO main_loop: warp_net::ipc: Bound ipc socket name="warp_service" path="/run/cloudflare-warp/warp_service"
2024-06-03T13:05:30.208Z  INFO main_loop: warp::warp_service: Warp IPC listening on "warp_service"
2024-06-03T13:05:30.208Z  INFO firewall: Firewall engine running
2024-06-03T13:05:30.209Z  WARN main_loop: warp::warp_service: Failed to load Registration error=OsError(Os { code: 2, kind: NotFound, message: "No such file or directory" })

when I do command

warp-cli connect

then in logs you can dind again info that registration is not done

2024-06-03T13:26:46.397Z  INFO warp::warp_service::ipc_loop: IPC: new connection exec_context=Regular process_name="/usr/bin/warp-cli" pid=12054
2024-06-03T13:26:46.400Z DEBUG main_loop: warp::warp_service::ipc_handlers: Ipc request: 3c903fa0-fb22-470d-a8a5-48760be99d7e; GetAppSettings
2024-06-03T13:26:46.401Z DEBUG main_loop: warp::warp_service::ipc_handlers: Ipc request: f5781c1c-8359-4789-b37d-4b6d9f81e24c; GetAccount
2024-06-03T13:26:46.401Z DEBUG main_loop: warp::warp_service::ipc_handlers: Ipc response: f5781c1c-8359-4789-b37d-4b6d9f81e24c; Error: Missing registration. Try running: "warp-cli registration new"
2024-06-03T13:26:46.402Z DEBUG main_loop: warp::warp_service::ipc_handlers: Ipc request: 42a093b8-52b2-4c26-a3bc-df0104ad96eb; SetAlwaysOn(true)
2024-06-03T13:26:46.402Z  INFO main_loop: structlog: event="UserToggledV0" toggle="on" warp_colo="none" warp_metal="none"
2024-06-03T13:26:46.405Z DEBUG run: warp_settings::manager: LayerManager update: UserOverrides(<mutator>)
2024-06-03T13:26:46.405Z DEBUG run: warp_settings::manager: UserOverrides updated: UserOverrides { version: Some(Current), always_on: Some(true), operation_mode: None, disable_for_wifi: None, disable_for_ethernet: None, disable_for_networks: None, families: None, dns_log_until: DnsLogUntil(None), gateway_id: None, onboarding: None, organization: None, split_config: None, fallback_domains: None, proxy_port: None, disable_connectivity_checks: None, override_api_endpoint: None, override_doh_endpoint: None, override_warp_endpoint: None, override_tunnel_mtu: None, qlog_logging: None }
2024-06-03T13:26:46.407Z DEBUG main_loop: warp::warp_service::ipc_handlers: Ipc response: 42a093b8-52b2-4c26-a3bc-df0104ad96eb; Success
2024-06-03T13:26:46.408Z  INFO warp::warp_service::ipc_loop: IPC connection ended

but connection is OK.

In my opinion the issue is related with this error:
WARN main_loop: warp::warp_service: Failed to load Registration error=OsError(Os { code: 2, kind: NotFound, message: “No such file or directory” })

I am seeing the same issue when using Github actions GitHub - Boostport/setup-cloudflare-warp at v1.6.0

I figured out that my Service Auth tokens were expired. After refreshing them the WARP clients works.