Post a message to teams as a different user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2024 07:37 AM
I've managed to get the MS Teams Graph Spoke working and I'm able to post messages to teams channels. However every message looks like it comes from the Azure admin that approved the OAuth connection (this was done in Flow designer when I configured the connection).
Is there a way to post messages as a different user?
This article seems to suggest that it might be possible. It talks about changing the connection to be an Authorization connection rather than using client credentials. I did that, but messages still post as the Azure admin, and I can't find anywhere on the spoke to say post as a different user.
I'm not using virtual agent or anything like that, just flows that are posting messages when something happens.
Has anyone been able to get this to work? Or can any offer me some pointers or an alternative way of doing this?
Many thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 04:55 AM
We are having the same issue - I'm struggling to find a solution to this? Any help here would be great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 07:52 AM
Kind of. What I ended up doing was this:
1. Create a new user in Entra ID called ServiceNow.
2. Gave that user the roles needed to post into teams (there's two, can't remember them now).
3. Gave that user Cloud Admin (I think - maybe more).
4. Used that user to approve the connections in ServiceNow.
5. Removed the admin access from the Entra account (to appease the sec bods).
While this doesn't mean I can choose who to post as, it shows as coming from an account called "ServiceNow". So there's no person attached to it and I think in Teams, looks better. It just looks like a service hook and that's really what I wanted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 09:18 AM
We ended up just creating a "service account" & added it as a member on Entra app, and as a member in every Teams team that notifications need to send to, also create a sys_user record for this service account & gave it the access it needed for oauth tokens, using flows, and accessing all task types. So far, works like a charm, and all Teams notifications come from a service account called ServiceNow Notifications.