I am using an AppRegistration+ServicePrincipal to fetch a graph token for various tasks. This has been working fine until I tried to publish a teamsApp. At first I got the error that I was missing the AppCatalog.ReadWrite.All permission on my app, but after that was added I started receiving this error:
User not authorized to perform this operation. UserId: '00e4cfb7-b765-4d85-b337-f2b65c6395b0', TenantId: 'my tenantId'
The UserId that is referred to is the integrated ServicePrincipal 'Microsoft Teams Graph Service'. So I thought that that SP needed some more permissions, so I added the AppCatalog.ReadWrite.All permission to that as well. But it still won't work.
In both SP's I tried adding both the delegated and application type.
Anyone have any idea on how to solve this issue?
I can't find anything in the documentation that tells me what I have done wrong, and where the 'Microsoft Teams Graph Service' comes into play. The error-message doesn't really give a clear picture of what the problem is.