Can we get User access URL for a Azure AD application using graph API ?

Abhinav Gupta 51 Reputation points
2021-10-13T11:47:54.4+00:00

I am trying to fetch a user's applications and want the UserAccessUrl from graph api, so that later that application can be clicked to directly login using SSO.

I see the User Access Url field in Enterprise Application in Azure AD, but do not get it as part of servicePrincipal API call.

Is there a way to get User access URL from a servicePrincipal (or any other API) response. ?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,782 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,734 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,688 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva-kumar-selvaraj 15,561 Reputation points
    2021-10-14T08:54:49.323+00:00

    Hello @Abhinav Gupta ,

    Thanks for reaching out.

    This is not a stored value and generated on the fly. You can generate User access URL with following format for your apps in Azure AD:

    https://myapps.microsoft.com/signin/<App ID>?tenantId=<TenantID>

    Example:
    https://myapps.microsoft.com/signin/aafa6b71-d828-4d3c-bde5-3df5226d5226?tenantId=cb3xxx3e-6xx0-4d6a-a3xx-6758bxxxff1a
    https://myapps.microsoft.com/signin/964ce160-750b-4408-91d4-291236ae5c62?tenantId=cb3xxx3e-6xx-4d6a-a3xx-6758bxxxff1a

    140516-image.png

    Hope this helps.

    ------
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.