JSD customer accounts will soon also have an accountId value, so checking for null won’t work much longer. What is your use case for needing to know the account type? In general it would be better to rely on application access or a permission check than the type of the account. In case of application access you will group JSD customer accounts and Atlassian accounts without application access on a site in the same bucket, which is in most cases the correct behaviour (most features of JSD treat the two the same).
I want to verify permissions in my connect app and deny access for “customer” accounts
Assuming I check for permissions via https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permissions/#api-rest-api-3-mypermissions-get
How could I verify the user accessing my resources is a customer? JSM created customers have “BROWSE_PROJECTS” permissions, so this is not possible. Checking for “ADMINISTER_PROJECTS” permissions is too much, as no everyone in the company has this permission.
A user can either have full access to a project (thus have access to the project in Jira), or only have access to the project in the customer portal. mypermissions operates under the assumption that the user could be in the portal, hence it returns “BROWSE_PROJECTS” in either case. Note that this is account type independent, as you could equally have an Atlassian account which only has portal access.