Fetch List of User from Azure ID to Salesforce

Amandeep Patro 21 Reputation points
2020-11-05T18:21:14.81+00:00

Hi Team,

When I am trying to fetch the list of users in Azure from this api https://graph.microsoft.com/v1.0/$metadata#users. I am getting status code as 200 but the body is something like this.

<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"><edmx:DataServices><Schema Namespace="microsoft.graph" Alias="graph" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EnumType Name="appliedConditionalAccessPolicyResult"><Member Name="success" Value="0" /><Member Name="failure" Val

Can any one please me with this

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,665 questions
{count} votes

2 answers

Sort by: Most helpful
  1. 2020-11-06T15:42:00.577+00:00

    Hello @Amandeep Patro , to get the service principal for your Salesforce application you need to call the MS Graph List servicePrincipals operation like this:

    /servicePrincipals?$filter=appDisplayName eq '<salesforce app display name>'
    Or
    /servicePrincipals?$filter=appId eq '<salesforce app (not object) id>'

    Also to get users assigned to the application you need to call List appRoleAssignments granted to a service principal.

    Let us know if this answer was helpful to you. If so, please remember to mark it as the answer so that others in the community with similar questions can more easily find a solution.

    0 comments No comments

  2. Amandeep Patro 21 Reputation points
    2020-11-12T19:02:12.363+00:00

    Hi anonymous user-msft

    Thanks for your response. I am trying to use it as you have mentioned. But I am facing an error as 302. Can you please help me with that.

    If it's possible, can we jump over a call.

    Thanks,
    Amandeep