IDA 9.5 adds a licensing API.
Everything the License Manager dialog does is now available from code, in the C++ SDK, IDAPython and IDA Domain.
Handy for plugins, headless scripts and shared-license pipelines.
IDA 9.5: Managing IDA Licenses Through the API