cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lkaspar
Resolver I
Resolver I

Azure API Management Custom Connector in Dataverse for Teams (D4T) Environment

Hi All

 

We've created a custom connector using Azure API Management as outlined in this blog post. The custom connector then gets exported to our Development (full Dataverse environment, this connector is called BusinessCentral) and the Dataverse for Teams environment (this one is called BusinessCentralTeams - more on that later). The big benefit of this is that users without a per-app or per-user can use the connector within Microsoft Teams.

 

The development of the app is done in a full Dataverse environment and then deployed downstream as a managed solution. At this point the BusinessCentral custom connector is part of the managed solution. When importing into the Dataverse for Teams environment, non-licensed users get a 'You require a premium license' error when opening the app. This is despite the fact that when opening the canvas app in the editor, the connection is not marked as premium.

 

lkaspar_2-1653458103040.png

 

The current workaround is to create an unmanaged layer in the Dataverse for Teams environment and do the following in the app:

 

1. Remove the BusinessCentral connection (when searching for it, it's marked premium)

2. Add the BusinessCentralTeams connector

3. Re-publish the app

 

lkaspar_3-1653458354182.png

 

 

This will remove the message for users and allow them to use the app.

 

The biggest downside is that it makes the deployment process complex and error-prone:

 

1. Import Managed Solution

2. Remove unmanaged layer

3. Edit the app and switch connections

4. Re-publish

 

Users also need to re-consent to the custom connector every time after completing this process (I think this can be solved by switching to oAuth).

 

The two connectors are obviously identical. The only difference is that one got deployed to a full Dataverse environment and then deployed as a managed solution. The other was directly deployed to a Dataverse for Teams environment from Azure API Management.

 

Question for the community/Microsoft:

 

How can we avoid having to create the unmanaged layer? Is there something I can configure in our Development environment prior to deployment? 

 

Any advise would be most welcome.

 

@mods - please move if this post should be in a different board

4 REPLIES 4
lkaspar
Resolver I
Resolver I

Anyone?

KH_2437
Helper I
Helper I

Hi @lkaspar ,

 

Did you ever find a resolution for this?

lkaspar
Resolver I
Resolver I

Hi @KH_2437 

 

Yes, I did. The trick is to export the custom connector from APIM into the Dataverse for Teams environment. You then export the custom connector as part of an unmanaged solution and import it into your full Dataverse environment.

 

Note: you won’t be able to add the custom connector to the solution directly. Instead, create a flow with the custom connector action and add it to the solution. Then right click on the flow and select ‘add required components’. This will add the custom connector. 

 

I’m currently on leave but can add more detailed steps when I get back.

Thanks @lkaspar ,

 

I would appreciate that.

 

Regards

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,379)