Increase max-length for givenName attribute - azure-ad-b2c

I am trying to create a user with the Graph API.
I experienced that the maximal length of a givenName can be 65 characters.
When I'm trying with a longer value I get a Bad Request response with error CODE "InvalidLength".
I would like to have a limit of 100 characters for the name.
Is it possible to override the maximum length for the givenName attribute?
I'm calling the API with such a request:
HTTP POST graph.windows.net/***.onmicrosoft.com/users

I have confirmed with Azure support engineer, we can not override the maximum length for the givenName attribute. And 64 characters for the name should be enough.
If you must use an attribute with the length 100 characters or more. You can use extension attributes.
Reference:
https://learn.microsoft.com/en-us/powershell/azure/active-directory/using-extension-attributes-sample?view=azureadps-2.0

Related

Remove mobile phone number or Update mobile phone number with empty string using microsoft graph api

I am using Microsoft graph API and using 'users' resource. Endpoint is https://graph.microsoft.com/v1.0/users. I am able to create user and update user's related field. Now I am trying to remove "mobilephone" number so, I sent empty string as a request info. but I am getting the following error.
Invalid value specified for property 'mobilePhone' of resource 'User'. "The mobilePhone should be between 1 and 64 characters.
Can I set empty string value to that field? How can I remove that field's value?
phoneNumber.replaceAll("[\\s\\-()]");
The regular expression defines a character class consisting of any whitespace character (\s, which is escaped as \\s because we're passing in a String)
Check String.replaceAll(String, String).

Wildcard searching for MRN numbers in FHIR

Is there a way I can do a wildcard search for MRN numbers in FHIR?
ex. I want to search for all MRN numbers starting with 12345.
thanks,
Suresh
I think this is actually a bit trickier than it may seem within the fhir standard.
For general text/string searching, your best bet would be the :contains modifier in your query parameters. For example:
[base]/Patient?given:contains=ada
should return a Bundle containing all Patient resources with the string 'ada' (case and accent insensitive) in the given name. However, MRN's are typically stored as Patient.identifier, which is a token parameter. The specification states:
"A token type is a parameter that provides an exact match search, either on a string of characters, potentially scoped by a URI. It is mostly used against a code or identifier data type where the value may have a URI that scopes its meaning, where the search is performed against the pair from a Coding or an Identifier. Tokens are also used against other fields where exact matches are required"
https://www.hl7.org/fhir/search.html#token
However, the specification also provides the :text modifier for token parameters, of which it states:
"For token: :text (the match does a partial searches on the text portion of a CodeableConcept or the display portion of a Coding), instead of the default search which uses codes."
This seems to suggest that you could perform your search with something like:
[base]/Patient?identifier:text=12345
...however the standard ALSO states that "only a few servers are expected to offer this facility." So you may be out of luck unless the server you are querying against has implemented this functionality.

How to use the content search web part to filter on a custom user profile property

We added the department number from AD to sharepoint. This property is multi valued in AD, and its multivalue in sharepoint.
My user profile screenshot:
http://screencast.com/t/e9xaZMyJJ2
Then in the CSWP, I want to filter by this value, please check here:
http://screencast.com/t/rlP95vrYRB3E
If I check the TEST, its using a GUID instead of the 613 code
http://screencast.com/t/ASltLUsIP
I am totally clueless.!! any idea?
Mapped property screenshot here:
http://screencast.com/t/gLXs2ZIR
In your user profile the department number is stored as a 'term' using a managed metadata field.
It's important to know that a 'term' can be translated or you can even define synonyms.
When using managed metadata in search, search will use the id (=a guid) of the term instead of the actual text ('613').
Since it ignores the text (and uses the id of the term), this makes it possible for search to find your term in any language or synonyms.
In your case translation of '613' is not really applicable but imagine that your department was a text instead of a number.
When searching on the term 'HR', search could return all the items with 'HR' but also the ones with 'personeelsdienst' (HR in Dutch).

Instagram API: How to specify count and offset for GET Likes/Comments?

How to get list of users, who like certain media, but with offset and limit parameters?
And how to use pagination?
When i retrieve response GET /media/{media-id}/likes?access_token={access_token}&count=5, it always return 200 likes and pagination=<null>.
How to iterate through all comments and likes?
Offset is not available. But there is MAX_ID parameter, where you can specify the ID of the last item you got.
You can find further information about the endpoints here.
I had this same problem... Instagram API doesn't allow you to paginate or limit the amount of likes returned. I solved this by limiting my foreach statement and you can probably do the same thing with a for statement.
Not quite what you asked, but in case you just want to get like count, you can do:
GET /media/{media-id}
And check the --data-likes-count on the JSON response.

Getting the location distance in a multi request

In trying to get a list of foursquare venues by id, I ended up using the multi endpoint.
However, the venues returned do not have a distance value from my current lat long
So, as an example I can use the venue endpoint
https://api.foursquare.com/v2/venues/43f9b9aaf964a520d12f1fe3?ll=47.62330382444445,-122.33604573666668
This will return a venue which has a distance value
However, trying to do the same using the multi endpoint
https://api.foursquare.com/v2/multi?requests=/venues/43f9b9aaf964a520d12f1fe3,/venues/40a55d80f964a52020f31ee3&ll=47.62330382444445,-122.33604573666668
This does not return a distance value
Any idea how to use the lat long parameter on a multi request?
I couldn't find much documentation on this
You need to pass the "ll" parameter as part of each of the requests listed out in "requests". Currently, the "ll" parameter is being interpreted as an argument to the "multi" endpoint, when you actually want it to be a parameter on each of the two "venues" requests.
You should URL encode the both of the full requests (including the ll parameter) and set that as the value of the "requests" parameter.

Resources