Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

We are Trying to Integrate ServiceNow Dev and Test with Microsoft Teams

naziyabegum
Tera Contributor

Hi @community I am in the process of setting this up at the moment. I have already Did the Prepublished method in Dev but Now we are looking to Promote it too Test.

I know that Prepublished is limited to 1:1 mapping.

I would take the approach of Self Configured Bot, we have Created Two Bots in the Azure teams, we have given the Bot Details in ServiceNow with the Client ID's and Client secrets for Both the Bots in Both the Environment. 

 

Now I'm stuck at this point can anyone Suggest me the Right way of Doing it, I'm going through so many Documentations but are confusing.

In the ServiceNow for Teams Do I have to Select

Connect Single ServiceNow with Microsoft Tenant or Connect Multiple ServiceNow instances with Single Microsoft Tenant.

If someone can Help me navigate this would Really Help

After I figure out the step then I can Download the manifest for each Instance and Give it to Teams Admin to Upload it. 

  1. Did you need to disconnect the current instance (we currently have our dev environment connected) and start over with the multiple instance option?
  2. Do we need to install and authorize all of the plugins/apps in all of the instances (the tenant connection, SSO and activity, etc.)?
  3. Do you need to create the manifest for each instance on that instance?

Also, when I try to Install azure apps in Test It was throwing me an Error saying only single instance can connect at the same time Right Now the Dev is Connected, if you Try to install it in Test then the Dev will be Disconnected. 

1 ACCEPTED SOLUTION

Hi @naziyabegum,

Yes, you do need this installed on Test too but the way you install it matters here.

That error, tenant already connected to another instance, is a known one. It shows up when the connection is still running through the older single-tenant model, which stores one Azure tenant ID against a single instance. That is exactly why connecting Test knocks Dev off, the system was never meant to hold two at once under that model.

Since you already set up separate self-configured bots for Dev and Test, this "Install Azure Apps" step needs the same treatment. Go into Azure and create a brand new, separate app registration just for Test, do not reuse or point back to the one Dev is using. Once Test has its own distinct registration, install and authorize from there, that should stop it from booting Dev off.

If you already created a separate registration for Test and you are still getting kicked back, it is worth confirming with your Teams admin whether this specific capability behind the Install Azure Apps button actually supports multiple instances the same way the bot channel does. Not every piece of the Teams integration follows the same 1:N model, so that is worth ruling out before digging further.

If this helped, feel free to mark it as helpful.

View solution in original post

6 REPLIES 6

rahulswami
Tera Contributor

Hi @naziyabegum,

Since you already created two separate bots in Azure with their own Client IDs and secrets for Dev and Test, go with Connect multiple ServiceNow instances with single Microsoft tenant, not the single-instance option.

That is the setting built for exactly this self-configured, many-to-one scenario.

To your three questions:

  1. No, you do not need to disconnect Dev and start over. Both environments can connect to the same tenant side by side once each is using its own bot registration.

  2. Yes, plugins and apps need to be installed and authorized separately on each instance. Tenant connection, SSO, and activity feed pieces are instance-specific, there is no shared authorization across instances.

  3. Yes, the manifest is generated per instance. Since each instance has its own bot registered in Azure, each one produces its own manifest file for your Teams admin to upload.

On the error where installing in Test disconnects Dev, that points to one of your instances still being set to single-tenant mode rather than multiple-instance mode. Check that Dev also has its tenant connection setting switched to multiple instances, not just Test. Both need to match for them to coexist without kicking each other off.

Hi @rahulswami Thanks for Explaining me the Process Clearly, I did the Exact same thing for our DEV and Test instance, we got our BOT for Test in teams but We didn't get anything for DEV, although we have uploaded 2 different manifests for two bots and used the Connect Multiple ServiceNow instance with Single Tenant option only. We did the Process on Friday afternoon, we only got the Test bot in teams but not the Dev. one, any specific reason.

Any Help would be appreciated. 

Hi @naziyabegum , 

First thing I would like to check: did you actually approve and assign the Dev app in Teams Admin Center after uploading it?

Uploading the manifest just gets it into the catalog, it does not make it visible to anyone until you approve it in Manage apps and add it to the App Setup Policy your test users are on. Super easy to miss the second time when you are doing the same steps back to back for two bots.

Also worth a quick check, open up the Dev manifest and make sure the app ID and the botId actually point to the Dev bot's Azure registration. If you cloned the Test manifest to save time, it is easy to leave one of those IDs unchanged by accident and Teams just quietly refuses it instead of throwing an obvious error.

Then in Azure itself, please go and check the Dev bot's Channels tab and confirm Microsoft Teams is actually added there. That's a separate step from just creating the bot and it is the kind of thing you do once and forget to repeat.

One more thing, you did this by friday and Teams admin changes can genuinely take up to 24 hours to show up for users. So if you checked right away over the weekend, that alone might explain it. Try having someone sign out and back into Teams (or just clear the client cache) before assuming something's actually broken.

@rahulswami Thank you so much for detailed Explanation, I will Cross verify with Teams Admin, 

Another Question would be Do I have to Install this In Test as well 

naziyabegum_1-1787579941369.png

 

Its already installed in DEV, when I try to Do the same in Test, it is throwing an Error as at a time you can only connect to one instance, if I try to connect with our Test then Dev will be disconnected. What should be the Move over Here, I have already installed all the Required Plugins in Test.