Public/Curanet/M365/Get-CuranetM365OnboardingCredentials.ps1

function Get-CuranetM365OnboardingCredentials() {
    Param(
        [Parameter(Mandatory)]
        [string]$SubscriptionId,
        [Parameter(Mandatory)]
        [ValidateSet("3370", "3850")]
        [string]$Account
    )

    try {
        $OnboardingCredentials = Invoke-CuranetAPI -Account $Account -Uri "https://api.curanet.dk/microsoft365/v1/Subscriptions/$($SubscriptionId)/OnboardingCredentials" -Method GET
    } catch {
        throw "Failed to retreive Onboarding Credentials from Curanet $($Account) API: $_"
    }

    return $OnboardingCredentials
}