Teams Personal App Development

New Contributor

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.

6 Replies
@Kameshm05 - 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.

@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-msgraph

 

In 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 file

      this.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

 

@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 Ov...

@Prasad_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?

@Kameshm05 
Please have a look on this once and let us know if it helps

@Kameshm05 - Could you please confirm if your issue has resolved with above suggestion or still looking for any help?
www.000webhost.com