Hello @Daan
Thank you for reaching out. This can be queried using Microsoft Graph PowerShell with beta profile. Please find the commands and sample out below:
Commands:
Connect-MgGraph
Select-MgProfile -Name beta
Get-MgDirectorySetting
Get-MgDirectorySetting -DirectorySettingId 08e0dc4c-39f0-410a-9921-ded2eaa07136 | Select-Object -ExpandProperty Values
Note: DirectorySettingID would be unique for your tenant, hence replace the value with value you see for your tenant.
Sample Output Screenshot from PowerShell and Azure Portal:
I hope this answer helps to resolve your issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.