Public/Client/Get-KB4AccountInfo.ps1
function Get-KB4AccountInfo { [CmdletBinding()] param ( [Parameter(Mandatory = $false)] [ValidateSet('true', 'false')] [string]$IsOwner = 'true' ) $query = "{`"query`":`"query accountInfo(`$isOwner: Boolean = false) {\n account {\n id\n companyName\n logoUrl\n country\n streetAddress1\n streetAddress2\n suiteNumber\n city\n state\n zipCode\n phoneNumber\n extension\n defaultLocale\n purchasedSkus {\n skuCode\n title\n expiresAt\n status\n }\n languageSettings {\n adminLocale\n phishingLocale\n trainingLocale\n }\n businessHoursStartHour\n businessHoursEndHour\n businessDays\n billingType\n accountType\n timeZone\n samlEnabled\n ...SamlSettingsProperties\n samlUserProvisioningEnabled\n idpSsoTargetUrl\n idpCertFormat\n idpCertFingerprint\n allowUsersToSignup\n hasPassless\n disablePasslessForAdmins\n passlessExpiresIn\n accountAdminTimeout\n userTimeout\n userMoves {\n id\n autofixUserDupError\n }\n ipRestrictionSettings {\n id\n enforceSameIp\n ipAllowList\n restrictConsoleSession\n }\n minimumPasswordLength\n disableOpenTracking\n includeArchivedUsersInReports\n defaultLandingPage {\n id\n }\n defaultLandingDomain {\n id\n }\n phishingSettings {\n id\n disabledTemplateAttackVectors\n customDomainPlaceholderEnabled\n customDomainPlaceholder\n overrideRphAddress\n aidaSelectedAvailable\n }\n trainingSettings {\n id\n enableSurveysDefault\n enableLocalizedNotifications\n }\n placeholderSettings {\n id\n emailBanner\n autoPrependEmailBannerPhishing\n subjectPrefix\n autoPrependSubjectPrefixPhishing\n displayName\n nameFormat\n signatureBlock\n prtSenderName\n prtSenderEmail\n }\n notesSettings {\n id\n general\n }\n usersSettings {\n id\n forcePasswordChangeOnFirstLogin\n }\n oofFromOverride\n disableReturnPathHeader\n disablePhishTestHeader\n enablePstTokenHeader\n customPhishingHeaderEnabled\n customPhishingHeaderName\n customPhishingHeaderValue\n hasAida\n hasPasswordIq\n passwordIqEnabled\n hasSecondChance\n apiEnabled\n phishalertEnabled\n hasWebhooks\n ...PhishalertSettingsProperties\n disableReturnPathHeaderForTraining\n customTrainingHeaderEnabled\n customTrainingHeaderName\n customTrainingHeaderValue\n primaryColor\n certBackgroundFileName\n subscriptionEndDate\n popcornTheaterReduceMotion\n partnerAccessExpiration\n gamification {\n id\n badgesEnabled\n badgesEnabledList\n leaderboardType\n leaderboardTimeWindow\n leaderboardGroups {\n id\n }\n leaderboardsIgnoreOptionalTraining\n }\n betaEnabled\n subscriptionObject {\n id\n subscriptionLevel\n friendlyName\n hasApi\n hasUserEventApi\n }\n numberOfSeats\n hasOnlyStaleContent\n userCount\n logoDownloadUrl\n ssoOriginalStatus\n ssoIn\n ssoOut\n ssoCallback\n ssoSlug\n ssoMetadata\n ssoBypass\n lmsForceAvailable\n anonymizePhishing\n anonymizedGroupSize\n pstToken\n apiToken\n ...UserProvisioningProperties\n ...UserProvisioningNotificationProperties\n resellerSubscriptionHasApi\n resellerSubscriptionHasUserEventApi\n userHasPhisherAccount\n phisherEnabled\n phisherSubscriptionEndDate\n hasTraining\n certSize\n certBackgroundUrl\n certPreviewUrl\n hasApi\n hasUserEventApi\n hasPhishing\n hasLdap\n sfid\n accountSettingsKcm {\n id\n kcmEnabled\n kcmSubscriptionEndDate\n }\n learnerExperienceSettings {\n customHelpEnabled\n customHelpUrl\n dashboardEnabled\n dashboardShowsPhishingStatistics\n dashboardShowsRiskStatistics\n disableTour\n optionalTrainingEnabled\n aidaOptionalTrainingEnabled\n aidaOptionalTrainingAvailable\n managerPhishingEnabled\n managerTrainingEnabled\n managerRiskScoreEnabled\n managerUserInfoEnabled\n mobileAppEnabled\n }\n eecSettings {\n scanDayOfMonth\n lastScannedAt\n }\n ...DkimConfigProperties\n }\n landingPageCategories(all: true) {\n nodes {\n name\n type\n landingPages {\n id\n title\n }\n }\n }\n landingDomains(all: true) {\n nodes {\n id\n name\n isDefault\n }\n }\n groups(all: true) {\n nodes {\n id\n name: displayName\n }\n }\n allowedDomains(all: true) {\n nodes {\n id\n name\n isPrimary\n }\n }\n locales {\n adminLocales\n phishingLocales\n trainingLocales\n }\n}\n\nfragment PhishalertSettingsProperties on Account {\n phishalertSettings {\n id\n name\n iconUrl\n isDefaultIcon\n defaultIconUrl\n license\n emailForward\n emailFormat\n alsoCc\n enableForwarding\n pullLocaleForPhishing\n allowUsersToComment\n globalDefault\n disableUnknownDisposition\n includeHeadersInEmailBody\n disableCridValidation\n outlookUrl\n hybridManifest\n graphManifest\n chromeExtension\n phishalertLanguages {\n id\n isDefault\n emailForwardSubject\n confirmationMessage\n showMessageReportNonPst\n messageReportNonPst\n showMessageReportPst\n messageReportPst\n timeoutReportPst\n reportButtonText\n reportGroupText\n language\n _destroy\n }\n }\n}\n\nfragment SamlSettingsProperties on Account {\n samlSettings {\n id\n entityId\n signSamlRequests\n disableNonSamlLogins\n allowAdminWithMfaLoginBypass\n }\n}\n\nfragment UserProvisioningProperties on Account {\n userProvisioning {\n adiToken @include(if: `$isOwner)\n allowed\n enabled\n legacyScimStatus\n scimPublicKeyExists\n scimStatus\n scimStatusChangedAt\n scimTenantUrl\n scimV2TenantUrl\n showGroupDomain\n source\n testMode\n }\n}\n\nfragment UserProvisioningNotificationProperties on Account {\n userProvisioningNotification {\n enabled\n timeframeDuration\n emailToNotify\n }\n}\n\nfragment DkimConfigProperties on Account {\n phishingDkimConfig {\n id\n custom\n emailType\n enabled\n dnsTxt\n domain\n fqdn\n selector\n validatedAt\n allowedDomainId\n }\n trainingDkimConfig {\n id\n custom\n emailType\n enabled\n dnsTxt\n domain\n fqdn\n selector\n validatedAt\n allowedDomainId\n }\n}\n`",`"variables`":{`"isOwner`":$IsOwner}}" Invoke-KB4WebRequest -Query $query } |