Forum Discussion

JanisAlksnisRS's avatar
JanisAlksnisRS
Advocate I
2 years ago
Solved

How to create connection for Copy Data activity source to retrieve user data from MS Graph API?

Greetings, community!

 

I'm new user here (just on Fabric trial) with our first pilot evaluation (proof of concept).
I've already found various different posts/solutions with different timestamps and tried them but none worked so far for me - and I know Fabric is constantly evolving, so I dare to post new question... 🙂

 

My task is to retrieve full list of users and their properties from MS Entra ID - I found I should use MS Graph API.

So far I've used Graph Explorer to define and test (I had to request consent for my personal account to make it work) the GET request:

"https://graph.microsoft.com/v1.0/users?$select=employeeId,userPrincipalName,surname,givenName"

and I successfully get the preview of JSON...

 

But "Basic" authentication doesn't work from Fabric (if I specify my personal account which now has permissions) - gives either "Invalid credentials" for some connection types, or error about JWS authentication token for others (something about dots - my username is "firstname.lastname@domain").

 

My first questions are:

- what type of connection I must choose nowadays to connect from Copy Data activity to Graph API?

- what type of authentication I must choose ("Anonymous" shouldn't be an option for list of all user properties)?

 

Thank you in advance,

Jānis Alksnis

  • You can use service principal authenticate to authenticate to the Graph API :

     

    Authentication options do not update dynamically based on the URLs that you provide, they are fized state of values and Anonymous auth being one of the type (which ideally you would ignore in production capacities)

1 Reply

  • You can use service principal authenticate to authenticate to the Graph API :

     

    Authentication options do not update dynamically based on the URLs that you provide, they are fized state of values and Anonymous auth being one of the type (which ideally you would ignore in production capacities)