0

Build your first SharePoint Adaptive Card Extension

I am following the tutorials/docs in above link and I have created my first ACE. However, I can't see in the docs or by googling, how to get the current user context.

Can anybody point me in the right direction, please?

1 Answer 1

1

You can get the current user details from this.context in HelloWorldAdaptiveCardExtension.ts.

For example:

I have this code in onInit() method:

let userEmail: string = this.context.pageContext.user.email;

You can also check this sample which uses current user details in ACE (line no. 48): Hybrid Work Employee Check-in from Adaptive Card Extension

1
  • 1
    Ganesh you are the man <3
    – BennKingy
    Commented Jan 19, 2022 at 9:20

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.