Greetings, I am trying to get a specific Person object from Azure Active Directory using their display name/email, such that I can update this Person object into a Sharepoint List with a ‘Person or Group’ Type Column. does anyone have experience with doing so?
I found that the ‘Azure Active Directory’ activity pack pack has a ‘Get User’ activity, but that requires a User Principal Name (UPN) or the object ID of the user. From Azure AD it seems like the UPN for my organisation is just our organisational email. I had tried using this activity with my own UPN/object ID, but was unable to pull my own User as output variable.
I get a General Exception, which I’m not sure is caused by what.
Get User: An error has occurred: Code: generalException
Message: An error occurred sending the request.
As per error it is clear that the user id value you provided is wrong…It might not necessarily be the email id…it can differ as well…depending on what azure account it is the domain might change
Hey there, thanks for the input! I had actually logged into Azure AD to double check my UPN, as well as checked in Command Prompt using whoami/upn. Both values are the same as my normal organizational email ID, so feel that it might be another issue .
Username & Password and SecureStrings are obtained from get credential activity.
Client and Tenant ID should be ok as well because I have used the same ID for Office 365 Scope activity.
Yeah, the Azure app I’m using for the Office 365 workflow is the same as this Azure one, and the username is the exact same.
In terms of the app scope/API permissions, the activities documentation states that so long as one of the following permissions are set (User.Read, User.ReadWrite, User.ReadBasic.All, User.Read.All, User.ReadWrite.All, Directory.Read.All, Directory.ReadWrite.All, Directory.AccessAsUser.All), the workflow should be able to access the dat using my personal account: