OfficeDev / microsoft-teams-apps-champion-management

Champion Management Platform is a custom Teams app that enables organizations to onboard and maintain champions/ SME in their organization in Teams.
MIT License
125 stars 48 forks source link

Not able to apply digital badge #128

Closed Harshjaswal closed 1 year ago

Harshjaswal commented 1 year ago

Hi Team,

I am not able to apply the digital badge. Below are the screenshots:

image image image image 194826332-6b7d9fdb-579a-4800-be3a-a8448be736f5
v-saikirang commented 1 year ago

Hi @Harshjaswal, Thanks for reaching out to us. I would like to check few things here:

1) May I know if this was working earlier and stopped working now? 2) Can you please check with any other user too. 3) Screenshot of the Graph API permissions in the SP Admin center. 4) Please try again and share the console logs for further investigation if you still see the issue. Thanks.

Harshjaswal commented 1 year ago

Hi @v-saikirang,

Please find below my answers:

  1. This was never working.
  2. Others are also facing the same issue.
  3. All the permissions which are mentioned here are assigned and approved. I can't share the screenshot due to company policies.
  4. Tried again, the errors in the console are same as I have shared earlier in this beginning of this thread.
v-prigunasek commented 1 year ago

Hi @Harshjaswal ,

Can you please call the below api in the Graph Explorer and see whether it is successful? https://graph.microsoft.com/v1.0/me/photo/$value

image

Also please check and confirm whether these 2 permissions (Sites.Manage.All , User.ReadWrite) are available under API Permissions in "SharePoint Online Client Extensibility Web Application Principal" application?

Goto Azure Portal >> App Registrations >> Under All applications click on "SharePoint Online Client Extensibility Web Application Principal" >> API Permissions.

image

Harshjaswal commented 1 year ago

Hi @v-prigunasek,

Please find my answers below:

  1. The API fails in the graph explorer:

    image
  2. Sites.Manage.All and User.ReadWrite are available under API Permissions in "SharePoint Online Client Extensibility Web Application Principal" application.

Harshjaswal commented 1 year ago

Hi @v-prigunasek ,

There was no profile pic setup on my office portal. So when I uploaded a new profile picture, and then I tried to run the API, it has returned the response status 200 with the Profile pic. Also I am able to apply the badge in the Champion Management App.

Maybe this is an issue with the app itself. It fails to apply the badge if there is not profile pic set up in your teams profile.

v-prigunasek commented 1 year ago

Thanks for checking this out, @Harshjaswal.

We will replicate this scenario from our end, and we will get this fixed in our next release.

Please let me know if this can be closed since you are able to apply the badges after adding profile picture.

Harshjaswal commented 1 year ago

Sure @v-prigunasek , But if you could provide the tentative date by when the fix will be rolled out that would be very helpful.

v-prigunasek commented 1 year ago

Hi @Harshjaswal ,

We don't have the release date as of now, but you can watch for the updates on this repo. Thanks!

v-prigunasek commented 1 year ago

Hi @Harshjaswal ,

Can you please check and confirm whether you have CDN enabled in your tenant and has */CLIENTSIDEASSETS origin in the Public CDN? Thanks!

Harshjaswal commented 1 year ago

Hi @v-prigunasek

Below is the screenshot for the same:

195343951-8720ed12-7585-4042-92a6-4497818f8314
v-prigunasek commented 1 year ago

Thanks for confirming that, @Harshjaswal.

We were able to reproduce this issue at our end, however this issue is limited to users who don't have a profile image in the CDN enabled tenants. App is working fine for the users who already have a profile image.

As mentioned earlier, we will fix this in our next release. Thanks!

Harshjaswal commented 1 year ago

Hi @v-prigunasek, @v-saikirang,

One question here:

The step number 11 in deployment guide talks about the "Sites.Manage.All" permission to the app package. Just wanted to check if this permission is only needed to create the SharePoint lists and libraries on which the app depends, then after the dependents lists are created can we remove this permission or is it still needed for the app to function properly. If its still needed, is there any option to downgrade the permission so that that this app package has the permission to the specific SharePoint site only.

v-saikirang commented 1 year ago

Hi @Harshjaswal,

Yes, this permission is required only to create the site and lists while setting up the app. And you can remove this permission if you are done with the set up and started using the app. Thanks.

Harshjaswal commented 1 year ago

Hi @v-saikirang , @v-prigunasek ,

The User.ReadWrite Permission which is needed for this app, is it delegated permission or application level permission?

v-saikirang commented 1 year ago

Hi @Harshjaswal,

It is a delegated permission.

Thanks.