KSC Open API
Kaspersky Security Center API description
wstring Session::StartSession ( )

Method to create authenticated session. Authentication details should be provided in Authorization HTTP header.

Returns:
Session token.

In case of EntraId logon and when HTTP result is not 200 OK then you should read detailed error description (if possible) from X-KSC-ErrorMsg. EntraId errors

See also:
Authenticated session