Skip to content

Commit

Permalink
Use $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrola committed Oct 3, 2023
1 parent 1ee04c3 commit 1c4a500
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ function Set-TargetResource
}
}
$TenantId = $CreateParameters.IdentitySources.ExternalTenantId
$DomainName = (Invoke-MgGraphRequest -Method 'GET' -Uri "https://graph.microsoft.com/beta/tenantRelationships/microsoft.graph.findTenantInformationByTenantId(tenantId='$tenantid')").defaultDomainName
$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/tenantRelationships/microsoft.graph.findTenantInformationByTenantId(tenantId='$tenantid')"
$DomainName = (Invoke-MgGraphRequest -Method 'GET' -Uri $url).defaultDomainName
$newConnectedOrganization = New-MgBetaEntitlementManagementConnectedOrganization -Description $CreateParameters.Description -DisplayName $CreateParameters.DisplayName -State $CreateParameters.State -DomainName $DomainName

foreach ($sponsor in $ExternalSponsors)
Expand Down

0 comments on commit 1c4a500

Please sign in to comment.