Recently I noticed, SPFx Extension is updated from drop build to RC (release candidate) build, because of that one of my SPFx Extension Application Customizer stopped working. I went to SPFx Extension documents and most of the things are updated in document and following them I was able to make my application customizer working.

But earlier, there was page context (this.context.pageContext object) variable available which is now removed from RC. I was using page context to get Web absolute url to do some REST API data pull and using site logo property to get the logo.

Is there any alternative available to get the page context in RC or it is completely removed?

1 Answer 1


No its not removed or deprecated. Its working correctly . Just upgraded a sample and was able to work with the this.context object without any issue.

You need to ensure that you are using it inside the onInit() method because this event occurs after this.context is populated.

If you are using it before the onInit method, it will be undefined.

I have used the below sample code and it correctly logs the value in console (see following screenshot):

export default class TestappApplicationCustomizer
  extends BaseApplicationCustomizer<ITestappApplicationCustomizerProperties> {

  public onInit(): Promise<void> {


    return Promise.resolve<void>();

enter image description here

  • Yes you are right. Thanks. Although yesterday I checked the complete ApplicationCustomizerContext and ExtensionContext to see if it there or not. But was not able to find it. Now I realized its in BaseComponentContext not in two mentioned above. Sep 7, 2017 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.