Forum Discussion
Teams Personal App Development
I was developed a teams personal app with "Teams ToolKit". The app is working well in the web version of Teams. But In desktop and Mobile client not working properly. My personal app contains a module about fetching current and all users details using GraphClientfactory. My app failed to load when calling the graph API module. In the web version, it's working correctly. I don't know what is the issue arise when calling graph call?
Here anyone faces the same issue?
please help me. I am stuck for about 2 weeks.
Thanks In advance.
- ChetanSharma-msftMicrosoftKameshm05 - Could you please the Graph API docs which you are referring, so that we can test it from our end.
Also could you please share the console log/error details from Teams Desktop client.- Kameshm05Copper Contributor
ChetanSharma-msft hi Chetan Sharma, Thanks for the reply. I am referred the below link for graph call
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraphIn the web version, there is no issue , data loaded correctly. But In the desktop version issue arose.
I am using the alert popup to lock the error message. But that message is shown as undefined. In the log not showing enough details to trace the issue.
I am using the below code in my ts filethis.context.msGraphClientFactory .getClient() .then((client: MSGraphClient): void => { alert(client) this.graphClient = client; resolve(); }, err => reject(err));
I am using the below code in my TSX file
const currentUser = await this.props.graphClient.me().then(async (user,error) => { if(error) { alert(JSON.stringify(error)); } alert(user.mail) });
Thanks, Chetan Sharma
- Prasad_Das-MSFTMicrosoft
Kameshm05
Could you please have a look at the solution provided over here and see if it helps anyway. Its in similar line as you are facing
sharepoint - SPFx webpart in MSTeams Desktop Client throws an UnauthorizedAccessException - Stack Overflow