Hi there,
I am looking for an example of getting custom (or even default) field.
e.g. DisplayName (ATTRIBUTE TYPE: Built-in)
e.g. MyCustomField (ATTRIBUTE TYPE: Custom)
It would be very useful to find an example on this page.
Line "B2C Get-Extension-Attribute <object-id-in-the-output-of-the-above-command>" doesn't give a lot of information on this theme.
Thanks.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
And is it possible to get only concrete fields?
I don't want to get all the information about the user in one JSON (all these fields like "city". "physicalDeliveryOfficeName", "isCompromised", etc.)
I just need 2-3 of them.
Thanks for the question. We are currently investigating and will update you shortly.
@AvgustPol We have assigned this to the content team to check with engineering if they can provide more details in the sample with the help of engineering team .
@davidmu1 Could you please help engage the sample author from engineering who can incorporate the details requested by the customer ?
@shashishailaj: Please assign this item to @mmacy who is now supporting Azure AD B2C.
To get the list of extension attribute for a given AAD application, specify the application object ID https://graph.windows.net/myorganization/applications/<application-object-id>/extensionProperties
For built-in properties, see this Entity and complex type reference | Graph API reference
@AvgustPol Hi Anton, yes you can get concrete fields by using the $select query parameter and specifying a comma-delimited set of field names. For example, to request only displayName and userType fields for a user object, use $select=displayName,userType.
For example:
GET https://graph.windows.net/myb2ctenant.onmicrosoft.com/users/772f35fe-0000-0000-0000-e5057d9bbf10?api-version=1.6&$select=displayName,userType
Authorization: Bearer fzJ9eX3NExu...
200: OK
{
"odata.metadata": "https://graph.windows.net/myb2ctenant.onmicrosoft.com/$metadata#directoryObjects/@Element",
"odata.type": "Microsoft.DirectoryServices.User",
"displayName": "Azure User",
"userType": "Member"
}
Hi @AvgustPol, thanks for your patience during the delay in responding to your issue. I'll go ahead and request closure for this issue now that it's been addressed, but please don't hesitate to contact us again if you feel your questions haven't been answered to your satisfaction.
@mmacy
@AvgustPol Hi Anton, yes you can get concrete fields by using the
$selectquery parameter and specifying a comma-delimited set of field names. For example, to request only displayName and userType fields for a user object, use$select=displayName,userType.For example:
GET https://graph.windows.net/myb2ctenant.onmicrosoft.com/users/772f35fe-0000-0000-0000-e5057d9bbf10?api-version=1.6&$select=displayName,userType Authorization: Bearer fzJ9eX3NExu... 200: OK { "odata.metadata": "https://graph.windows.net/myb2ctenant.onmicrosoft.com/$metadata#directoryObjects/@Element", "odata.type": "Microsoft.DirectoryServices.User", "displayName": "Azure User", "userType": "Member" }
Hi, @mmacy !
I've just checked answers about my question - that is exactly what I was looking for!!! Wonderful! c:
Thank you for supporting and your responses!
Best regards,
Anton Vlasiuk