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 Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,526 Reputation points Moderator
    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


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.