Get User Details from Action Card

%3CLINGO-SUB%20id%3D%22lingo-sub-719964%22%20slang%3D%22en-US%22%3EGet%20User%20Details%20from%20Action%20Card%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-719964%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%3C%2FP%3E%3CP%3EI%20am%20developing%20an%20action%20card%20and%20need%20to%20get%20the%20user%20phone%20number%20which%20is%20using%20the%20card%2C%20I%20have%20tried%20to%20use%20the%20following%20methods%20from%20KasClient.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CSTRONG%3E%3CSPAN%20class%3D%22cm-variable%22%3EKASClient%3C%2FSPAN%3E.%3CSPAN%20class%3D%22cm-property%22%3EApp%3C%2FSPAN%3E.%3CSPAN%20class%3D%22cm-property%22%3EgetCurrentUserIdAsync%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%3CSTRONG%3E%3CSPAN%20class%3D%22cm-variable%22%3EKASClient%3C%2FSPAN%3E.%3CSPAN%20class%3D%22cm-property%22%3EApp%3C%2FSPAN%3E.%3CSPAN%20class%3D%22cm-property%22%3EgetUsersDetailsAsync%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGetting%20current%20UserId%20works%2C%20but...%20when%20I%20query%20the%20UserDetails%2C%20the%20JSON%20structure%20has%20empty%20data%20for%20most%20of%20the%20fields.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestion%3F%3C%2FP%3E%3CP%3EDo%20I%20need%20permissions%3F%20which%20ones%20should%20I%20request%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebest%20regards%3C%2FP%3E%3CP%3ERamon%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-722520%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20User%20Details%20from%20Action%20Card%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-722520%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F366424%22%20target%3D%22_blank%22%3E%40RamonMata%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EMore%20details%20about%20how%20the%20Kaizala%20API%20call%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%3EThe%20custom%20action%20card%20is%20using%20VueJS%20to%20create%20the%20mini%20app%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3EThe%20call%20to%20KAizala%26nbsp%3B%20API%20was%20executed%20at%20the%20moment%20of%20creation%20of%20the%20Main%20Vue%20component%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ESolution%20or%20workaround%3C%2FSTRONG%3E%3A%3C%2FP%3E%3CUL%3E%3CLI%3ERemove%20the%20Kaizala%20API%20calls%20outside%20the%20Vue%3C%2FLI%3E%3CLI%3EAt%20the%20HTML%20level%2C%20calling%20the%20Kaizala%20API%3C%2FLI%3E%3CLI%3ESet%20a%20variable%20with%20the%20results%20of%20API%20in%20the%20global%20namespace%3C%2FLI%3E%3CLI%3ENow%20from%20Vue%20I%20can%20access%20that%20global%20variable%20with%20the%20data%20needed%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebest%20regards%2C%3C%2FP%3E%3CP%3ERamon%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi!

I am developing an action card and need to get the user phone number which is using the card, I have tried to use the following methods from KasClient.

 

KASClient.App.getCurrentUserIdAsync
KASClient.App.getUsersDetailsAsync

 

Getting current UserId works, but... when I query the UserDetails, the JSON structure has empty data for most of the fields.

 

Any suggestion?

Do I need permissions? which ones should I request?

 

best regards

Ramon

 

 

1 Reply
Highlighted

@RamonMata 

 

More details about how the Kaizala API call

  • The custom action card is using VueJS to create the mini app
  • The call to KAizala  API was executed at the moment of creation of the Main Vue component

 

Solution or workaround:

  • Remove the Kaizala API calls outside the Vue
  • At the HTML level, calling the Kaizala API
  • Set a variable with the results of API in the global namespace
  • Now from Vue I can access that global variable with the data needed

 

best regards,

Ramon