web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to connect the external tenant user to connect with Azure portal app?

(1) ShareShare
ReportReport
Posted on by 16
I have registered an application in the Azure portal by selecting the option 'Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant)'. Also added an external tenant user.
When I tried to use the app's client ID, tenant ID, and secret key with the external user's login, I got redirected to the call-back method and was able to generate an access token based on the app's client ID, tenant ID, and secret key with the authorized code (which I got from callback).
When I tried to get the company details using the access token with the app's tenant ID, I got an unauthorized error in Postman.
 
Is the above flow correct or not?
Using the app's tenant ID to generate an access token is valid or not and how to get the external user's tenant ID or how to generate an access token for the external tenant?
Also how to get the environment name for the tenant user and company details?
Because in APIs, I have to add the environment name, tenant ID, and company ID.
 
Which tenant_id do I have to use and if it is for an external user then how to get it?
How to get the environment name for the external tenant user?
How to get company details for an external tenant user?
 
***Note***
For the same tenant, I used the app's tenant ID and was able to get company_ID from the API response and also able to get Sales orders. The environment name I got from the Admin Center from Dynamics 365 Business Central. But for trial users where should I get this?

How to connect the external tenant user to connect with Azure portal app using the portal user's client ID, and client secret?
 
API:
https:/api.businesscentral.dynamics.com/v2.0/{{tenant_Id}}/Production/api/v2.0/companies({{company_Id}})/salesOrders
I have the same question (0)
  • Nitin Verma Profile Picture
    21,698 Moderator on at
    Hi,
     
    Have you provided the consent with the same App id in Business central using below image and set the permission?
     
     
     
     
  • Community member Profile Picture
    16 on at

    Hi Nitin Verma,
    Thanks for your reply. But could you clarify the below things


    Are you saying that I need to include the app ID's inside Business Central?

    But is the Microsoft Entra app in the admin center?

    Why cannot I see this in the trial account?

  • Suggested answer
    Gerardo Rentería García Profile Picture
    25,157 Most Valuable Professional on at
    Hi
    I hope this can help you, and give you some hints
    Task 2: Set up the Microsoft Entra application in Business Central  Using Service to Service Authentication - Business Central | Microsoft Learn 
    Best regards
    Gerardo

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans