3

Try using below endpoint: http://<sitecollection>/<site>/_api/web/lists/getbytitle('Display name of List')/contenttypes OR http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes official documentation: SP.ContentTypeCollection object - REST resource endpoint. Update: Try using something like below to fetch the names ...


2

Try using below solutions: Solution 1: Use legacyPageContext to access the pageContext info: // This is how you can access the page context info this.context.pageContext.legacyPageContext; // Retreive current user display name this.context.pageContext.legacyPageContext["userDisplayName"]); Source: Access _spPageContextInfo details in SharePoint ...


Only top voted, non community-wiki answers of a minimum length are eligible