Redirect URL Graph API

Thiemen Siemensma | Bijlsma BV 41 Reputation points
2020-05-15T12:29:54.487+00:00

So currently I'm trying to build a custom connection to the MS graph API, in the Azure App I've added the Group.ReadWrite.All and a key using admin rights, still, I've encountered the following problem:

When creating/updating the connector, the redirect URL is not created, the following tutotial said it would:
https://learn.microsoft.com/en-us/graph/tutorials/flow

I've configured the app registration and custom connector setting as shown in the attached images below.

When I try to authenticate using the swagger editor I get the error that an redirect url is missing, I thought it would create itself?
And if I have to add an redirect url by myself how would it look like?

Can anyone tell my what I'm doing wrong here?

8334-inkedconnectorsettings-li.jpg
8349-inkedapp-settings-li.jpg

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,859 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,442 questions
0 comments No comments
{count} votes

Accepted answer
  1. Don Miller 76 Reputation points
    2020-05-17T17:50:37.743+00:00

    @Thiemen Siemensma | Bijlsma BV , I had the same issue and kept trying the "msmanaged-na" redirect Microsoft provided in the example (and I had used a number of months ago with a similar custom connector).

    I finally just saved the custom connector and selected "+ (create connection)" and looked at the URL in the consent window.

    I took the redirect_uri value from the consent URL (https://global.consent.azure-apim.net/redirect) and added it in the App Authentication as a new Web endpoint. It allowed me to complete the tutorial successfully.


3 additional answers

Sort by: Most helpful
  1. soumi-MSFT 11,716 Reputation points Microsoft Employee
    2020-05-15T12:42:48.643+00:00

    @Thiemen Siemensma | Bijlsma BV , Redirect URL is something that you need to provide manually while creating the app registration in AAD. A redirect URL is required as on this url AAD would redirect you back after authentication to post back the response from AAD which can be either an access token or a code based on the OAuth flow chosen.

    You can get more idea about redirect URLs here.

    Hope this helps.

    Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.


  2. Thiemen Siemensma | Bijlsma BV 41 Reputation points
    2020-05-15T14:10:21.053+00:00

    Do I need to add something like https://localhost, can't figure out what kind of redirect url to use, flow says that, on save, it will generate a url for me, this is the thing that doesn't work


  3. Ricky Davenport 0 Reputation points
    2023-05-12T21:21:54.8533333+00:00

    For anyone coming here from Google (or Bing!) trying to figure if you can set the redirect URIs of your app dynamically using the REST API, you can by setting the appropriate property when creating the app (web, spa, etc.).

    For example, using the @microsoft/microsoft-graph-client npm library:

    const application = await client.api("/applications").post({
        displayName: "Example",
        spa: {
          redirectUris: [
            "http://localhost:3000",
          ],
        },
    });
    
    

    The docs are available here

    0 comments No comments