File tree Expand file tree Collapse file tree
Modules/CIPPCore/Public/Entrypoints Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,10 +22,24 @@ function Invoke-ListExternalTenantInfo {
2222
2323 if ($TenantId ) {
2424 $GraphRequest = New-GraphGetRequest - uri " https://graph.microsoft.com/beta/tenantRelationships/findTenantInformationByTenantId(tenantId='$TenantId ')" - NoAuthCheck $true - tenantid $env: TenantID
25+
26+
27+ # New API call to retrieve branding details
28+ $brandingBody = @ {
29+ username = " completelymadeupdoesnthavetobevalid@$ ( $GraphRequest.defaultDomainName ) "
30+ } | ConvertTo-Json
31+
32+ $brandingHeaders = @ {
33+ " Content-Type" = " application/json"
34+ }
35+
36+ $brandingResponse = Invoke-RestMethod - Method Post - Uri " https://login.microsoftonline.com/common/GetCredentialType" - Body $brandingBody - Headers $brandingHeaders
37+
2538 $StatusCode = [HttpStatusCode ]::OK
2639 $HttpResponse.Body = [PSCustomObject ]@ {
2740 GraphRequest = $GraphRequest
2841 OpenIdConfig = $OpenIdConfig
42+ UserTenantBranding = $brandingResponse.EstsProperties.UserTenantBranding
2943 }
3044 } else {
3145 $HttpResponse.StatusCode = [HttpStatusCode ]::BadRequest
You can’t perform that action at this time.
0 commit comments