Configure Application Proxy using the Microsoft Graph API

Karol Broniek 0 Reputation points
2023-01-11T12:39:05.9566667+00:00

I'm trying to automate the Application Proxy configuration. I can create applications, and service principals and configure permission. But I can't find a way to configure the app proxy. I found this page https://learn.microsoft.com/en-us/graph/application-proxy-configure-api?tabs=http but it uses the beta version (i.e. https://learn.microsoft.com/en-us/graph/application-proxy-configure-api?tabs=http#request-6).

Are there any endpoints in the Graph API in the release version that I can use to configure app proxy or when is MS going to release the beta version?

As I can see the Azure portal uses the https://main.iam.ad.ext.azure.com/api API to configure the app proxy. Can I use this API in my automated process? If so, how can I obtain a token for this API?

I found that I can obtain a token using az account get-access-token --subscription $subscription --resource 74658136-14ec-4630-ad9b-26e160ff0fc6 but it doesn't work for me because I have to use oauth authorization-code-flow. Is there any chance to use this https://main.iam.ad.ext.azure.com/api API?

I found following endpoint as well but still I'm not going to pass the client username and password through my APP. POST https://login.microsoftonline.com/{{tenatId}}/oauth2/token

resource:74658136-14ec-4630-ad9b-26e160ff0fc6
grant_type:password
username:{{username}}
password:{{password}}

enter image description here

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bhanu Kiran 3,616 Reputation points
    2023-01-17T23:07:00.7433333+00:00

    Hi @Karol Broniek ,

    Currently, for updating the property of "onPremisesPublishing" in Configure Application Proxy the API only support beta version. You can track new features/changes in Graph API Using the below Documentation.

    ChangeLog & What's New

    For getting access token using OAuth 2.0 authorization code grant type you can refer below resource article.

    Microsoft identity platform and OAuth 2.0 authorization code flow - Microsoft Entra | Microsoft Learn

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.