SPFx Extension Get Private Site

Aniruddha Aditya 41 Reputation points
2020-12-30T18:07:05.24+00:00

Dear All,

I have created a banner using spfx application customizer and want to check if the modern team site is public so that it shows up the banner.

I am not getting the code snippet for the same. Any help?

Thanks
Aniruddha

Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments
{count} votes

Accepted answer
  1. ZhengyuGuo 10,586 Reputation points Moderator
    2020-12-31T03:16:54.543+00:00

    Hi @Aniruddha Aditya ,

    In the SPFX Application customizer, it's available to call Rest API "/_api/web?$select=AllProperties&$expand=AllProperties" to get the modern team GroupType value, please check the following code demo in the attachment file:

    52366-code.txt

    52368-snipaste-2020-12-31-11-16-18.png

    52339-snipaste-2020-12-31-11-14-29.png

    Thanks
    Best Regards


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Aniruddha Aditya 41 Reputation points
    2021-01-01T13:26:51.44+00:00

    Thanks, It solved what i was trying.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.