Apigee Edge can integrate with external identity providers in a number of ways.
You said you want to
use Apigee Edge just as a resource server and use Azure Active Directory for authentication and token issuance.
And here I have a question: what kind of tokens are you talking about? There are things such as “identity tokens”, aka id_tokens. These are tokens in JWT format which are issued by Open ID Connect identity providers to identify individuals. Azure Active Directory is one such system that can issue such tokens. Others include Google Signin, Ping Identity, Salesforce.com, and there are more.
These ID tokens are useful for collecting a bunch of metadata about a person, signing it, and then providing it to an “audience” or an app. This is the way that a mobile app might learn of the email address of the user, or the surname, or the group affiliation, or some other metadata that the Identity provider might choose to assert about the subject (person). Because the identity provider signs the JWT with its private key, any party can verify the signature with the public key, and subsequently can rely on or trust the assertions in the token.
Access tokens are different. Access tokens can come in various formats, including JWT or just :opaque: tokens (usually a random string of alphanumeric digits), but the format is not the difference I am talking about here. The key difference is the purpose of the token, what it is used for. The access token is checked by the resource server (often Apigee Edge) in order to verify that the {user, app} tuple that is requesting a resource, should be permitted to request the resource.
So which kind of token do you want Azure AD to issue?
With an access token, the resource server might enforce a simple authorization check - “is this token valid?” - or it may be much more nuanced than that. For example, is this token valid for the given verb+resource path? Does this token have the required scope (READ ACCOUNT, DELETE PROFILE, UPDATE BALANCE, etc)? Is this token within the rate limits prescribed for this API? Apigee Edge is good at all of these sorts of nuanced checks, and in order to perform such checks, Apigee Edge needs to “know” about the token. That means the token must be present in the Apigee Edge store.
Apigee Edge “knowing” about a token is not the same as Apigee Edge issuing the token. Obviously Apigee Edge ⟪knows⟫ about a token when Apigee Edge itself issues the token; and this is the normal case, and is probably the case you see in most of the various examples published here on community or in youtube videos and apijam handson exercises and so on. But it is also possible for Apigee Edge to ingest a token generated by a third-party system, like Azure AD, and then store the token, so that it can be used for all the nuanced checks I described previously. In fact, importing a token is the topic of a community question I answered two weeks ago.
On the other hand it is possible to allow Apigee Edge to check (verify) an ID token and exchange that for a “native” access token. This may be easier and smoother. In this approach, the user employs the app, goes through an OpenID Connect signin, the app receives the id_token from the IDP, and then the app can send the id_token to Apigee Edge; Apigee Edge verifies the token, and then issues a time-limited access token generated by Apigee Edge.
Either importing an access token generated by Azure AD or using Apigee Edge to generate an access token from an inbound id_token, would require the application identifier (aka consumer key, aka client id) to be synchronized across Azure AD and Apigee Edge. Fortunately Apigee Edge allows import of a client id / secret pair via API.
Does this help?