Forum Discussion
Teams Personal App Development
Also could you please share the console log/error details from Teams Desktop client.
- Kameshm05Oct 11, 2021Copper 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-MSFTOct 12, 2021
Microsoft
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- Kameshm05Oct 12, 2021Copper ContributorPrasad_Das-MSFT
Thanks. I am done with the step mentioned in that article. But my manifest JSON is already in the correct format. But I don't know what is the issue?