I associated a business account for an unrestricted external user and have provided both portal admin and customizer roles but still cannot customize on the portal and when
Thanks Peter Rankin I updated my script the same way and it worked for 2019R1
INSERT INTO dbo.PortalMap
(
CompanyID,
Position,
Title,
Description,
Url,
ScreenID,
CompanyMask,
NodeID,
ParentID,
CreatedByID,
CreatedByScreenID,
CreatedDateTime,
LastModifiedByID,
LastModifiedByScreenID,
LastModifiedDateTime,
RecordSourceID
)
SELECT CompanyID,
Position,
Title,
Description,
Url,
ScreenID,
CompanyMask,
NodeID,
ParentID,
CreatedByID,
CreatedByScreenID,
CreatedDateTime,
LastModifiedByID,
LastModifiedByScreenID,
LastModifiedDateTime,
RecordSourceID
FROM dbo.SiteMap
WHERE ScreenID = 'AU000000'
AND NOT EXISTS
(
SELECT *
FROM dbo.PortalMap
WHERE CompanyID = dbo.SiteMap.CompanyID
AND ScreenID = dbo.SiteMap.ScreenID
);