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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Trying to Authenticate a current multi-tenant application with On-Premise install

(0) ShareShare
ReportReport
Posted on by 15

Hi,

I'm trying to figure out how to do Authentication of our companies current multi-tenant application (used to push data to multiple customers Dynamics CRM accounts) with a customer that has an on-premise install of MS Dynamics.  Our application works great (over 2 years now) with our customers that have online Dynamics CRM accounts. 

The current method of Authentication for online CRM accounts uses the regular OAuth process:
https://docs.microsoft.com/en-us/previous-versions/azure/dn645542(v=azure.100)?redirectedfrom=MSDN

However we now have customers with on-premise accounts.  Attempting to Authenticate with on-premise CRM account (using the same method we use for online CRM accounts) we get the following error (occurs when attempting to get the Auth and Refresh Tokens with the returned code once they've allowed access to our App):

Token Refresh Error [invalid_request] AADSTS90002: Tenant 'XXXXXXX-XXXX-4aac-XXXX-b9ba8cb78f24' not found. This may happen if there are no active subscriptions for the tenant. Check with your subscription administrator

Trace ID: 72f684e6-8296-4e8e-9fff-56eea7a86c00

Correlation ID: d40892a5-30fc-4d85-9f5a-14e19a241649

Timestamp: 2019-11-08 21:44:21Z [code=90002]

So my main questions are:

1)  The current OAuth method hits the https://login.microsoftonline.com/common/oauth2/authorize endpoint -- does this need to change and need to point to the clients domain?  If so, does would it be the same across all on-premise installs?

2) Can the on-premise install still use our multi-tenant application as it's currently created?  Or does a unique application need to be created on the on-premise Azure AD in order to work?  Ideally they would be able to use our currently created multi-tenant application -- can that app somehow be allowed to be used by the on-premise install (whitelisted or whatever the terminology would be)?

3) Do I need to do Authentication differently for on-premise installs?  The documentation appears to show that the WebAPI call will all be the same and won't be a problem -- it's just that getting authentication working seems to be a problem.

Any help from anyone here would be greatly appreciated.  Links to documents, experience from your own install, etc -- any of it would help.

** EDIT **  If you think this post belongs in a different or more appropriate forum, please let me know and i'll post it there.  I'm not completely familiar with the MS forums -- maybe there are dev forums more appropriate for this type of question?!?

Thanks...  Michael

I have the same question (0)
  • Dev.Michael Profile Picture
    15 on at

    Responding to my post to say that if you are fluent with the MS Dynamics App/Web API environment, I am willing to contract the work needed to figure out how to make our Azure App work with on-premise Dynamics instances.    

    Any help would be appreciated!

    Thanks... Michael

  • Luciano Navomi Profile Picture
    20 on at

    Hi Michael!

    I didn’t send you the answer before because we’re just starting our integration with On-Premise just now.

    As it is an On-Premise version without Azure, to work with OAuth2 the ADFS 2016 option must be used. Take a look at this link because I think this solves your problem.

    cloudriven.fi/.../

    Regards

  • Suggested answer
    Luciano Navomi Profile Picture
    20 on at

    Hi Michael!

    Let me share with you the Microsoft documentation about the AD FS OAuth Flows.

    https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/overview/ad-fs-openid-connect-oauth-flows-scenarios

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans