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.
2,447 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Siva-kumar-selvaraj 15,721 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.

    2 people found this answer helpful.

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.