@Oleg Tserkovnyuk, Thanks for posting in Q&A.
From your description, we understand that you want to check whether you have Intune enabled via PowerShell or GraphAPI.
I did some research about the issue, it was found that you can check whether Intune is enabled via PowerShell via the following commands. Here is my test:
- Install Microsoft.Intune.Graph Module via entering Install-Module Microsoft.Intune.Graph at the PowerShell.
- Entering command Invoke-MSGraphRequest -Url https://graph.microsoft.com/beta/organization('$DirectoryID')?`$select=mobiledevicemanagementauthority -HttpMethod Get | Select mobileDeviceManagementAuthority to check whether Intune is enabled.
Here is the link about how to check MDM authority:
Set the Intune MDM Authority using PowerShell - Naglestad Consulting (naglis.no)
Note: Non-Microsoft link, just for the reference.
Hope above can be helpful!
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.