I've been working with MS Graph API for some time now and I've been treating MS User Id in a case sensitive manner (and it worked properly). But lately I started to wonder if that is a correct approach.
I didn't find in documentation any specific mention of user id being case sensitive or case insensitive. All I found was a vague "resource id should be case sensitive". But I'm not sure if that is applicable to user id.
I'm talking about those user ids:
https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0
So the question is - is user id case (in)sensitive?
The UPN isn't case sensetive, you could try this out yourself by requesting the data for one user and changing some letters to uppercase.
Related
I'm brand new to wrangling the IG Graph (and to API's, in general) and hoping someone might be willing to lend a hand. A bit of context: I am building a SaaS on Bubble.io. I have my authentication set up and am in the process of developing my FB App. In short, I want to enable the following:
Auth'd users curate content on IG by #mentioning my app's account in a comment to a post.
Those comments are intercepted via web hook (currently running smoothly on Integromat).
They payload is then passed to an API Workflow on Bubble, which parses the comment ID
The workflow then retrieves details of the comment and associated post.
The comment is correlated with the appropriate app user based on the username of the comment's owner.
The final two steps is where I'm confused. Based on my reading of FB's documentation, it seems impossible to retrieve a username or user id for the owner of a mentioned comment, which clearly presents a problem for me. Is this the case or am I just missing something? It seems to me there should be a way of getting at this data.
enter image description here
You can use the username field, as done followingly:
mentioned_comment.comment_id(COMMENT_ID){media,text,username}
Logged in as the Office 365 Global Administrator, I want to get the relevant people list for any user in Active Directory.
I can get my calls to return using
https://graph.microsoft.com:443/v1.0/users('my.address#contoso.com')/people
and
https://graph.microsoft.com:443/v1.0/users/{the user id}/people
and
https://graph.microsoft.com:443/v1.0/users('{the user id}')/people
and
https://graph.microsoft.com:443/v1.0/users/my.address#contoso.com/people
but, as an Office 365 admin with People.Read.All consent in the app, the call only returns one person (the target user's profile) for any user but myself. If I call it for my user I get a list of ten people
If I log in as that other person and make the People List API call it returns the expected ten results.
JWT scope: "scp": "Files.ReadWrite Mail.Send People.Read.All User.Read
I have to change the scope to People.Read for the non-admin.
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_people
the call only returns one person (the target user's profile) for any
user but myself.
Answer is in the API Doc. As the document says.
Retrieve a collection of person objects ordered by their relevance to
the user, which is determined by the user's communication and
collaboration patterns and business relationships.
The following request gets the people most relevant to another person in the signed-in user's organization
https://graph.microsoft.com:443/v1.0/users('my.address#contoso.com')/people
It might happen that there is no one relevant to that user.
If you want the list of contacts in other user's contact list then you can refer to this one :
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_contacts
UPDATE
https://developer.microsoft.com/en-us/graph/graph-explorer
I used the demo account on this website. I used this query
https://graph.microsoft.com/v1.0/users/08fa38e4-cbfa-4488-94ed-c834da6539df/people It worked.
This query gives the same result
https://graph.microsoft.com/v1.0/users('08fa38e4-cbfa-4488-94ed-c834da6539df')/people
Same result
https://graph.microsoft.com/v1.0/users('MiriamG#M365x214355.onmicrosoft.com')/people/
Same result
https://graph.microsoft.com/v1.0/users/MiriamG#M365x214355.onmicrosoft.com/people/
If you still can't get it to work and specially on Graph Explorer Website. Then it means that according to Microsoft there are no relevant people for that particular user.
As you can see there are different ways to use the same thing. Try it all if it works. Let me know.
I am not seeing this behavior in the Graph Explorer sample tenant. The behavior seems to indicate that this is auth-related. I would try to sign in with the admin again and make sure that you've consented to any of the admin-only scopes. Additionally, one thing you can do to figure out whether you have the appropriate scope in your token is decoding the JWT and examining the "scp" collection.
Reading online material (e.g. Fowler, Gerard), it seems that Specification By Example stories should not be complete specifications of functionality.
Question 1: How does one starting off with SBE's decide how comprehensive their stories need to be in terms of describing all of the functionality of a system? I.e. when can I stop writing stories because I have captured enough?
Question 2: In an organisation where test teams verify products against the product documentation, if the stores are not a complete specification, am I correct in thinking that 'other' product documentation needs to contain all the cases that are not covered by the SBE's?
Regarding question 1:
The most important part of developing any system is that the development team has a conversation with the product owner. First find out the crux of the feature which they require. I'll answer this question by working through an example; let us say that the product owner may want a facility to login to their new website. This requirement could be written as:
In order to gain access to the website's facilities
As a user
I want to be able to login to the website
(Note that I'm using the Gherkin domain specific language for writing the scenarios and features in this answer)
With the product owner's key requirement specified, you should now discuss with them how you think this feature should be implemeneted from a users perspective (keep it high-level, don't use technical jargon, discuss with the business to find out what they want). So the first "happy path" scenario you might identify could be:
Given a user is on the login screen
When they submit valid login credentials
Then they gain access to the main website
After further discussion with the product owner they tell you that as the website contains extremely sensitive information, and that any failed log-in attempts should be reported to a system administrator. This would result in another scenario:
Given a user is on the login screen
When they submit invalid login credentials
Then the system administrator is informed of the failed log-in attempt
And the user is informed that their login attempt failed
At this point the product owner might say that these are the only scenarios they want for logging into the system. So from the development teams perspective no more investigation would need to be done regarding this feature (so you wouldn't need to write any more user stories). Sure, at a later point in the projects development, the product owner might also tell you that they'd like to inform a user when they last logged into their site before reaching the main website, but you'd only need to worry about this when they ask for it.
Regarding question 2:
The organisation should be verifying the products against "living" documentation e.g. using Cucumber(for example) which generates tests from the scenarios detailed above.
Also as I said in the answer to question 1, you should identify "just enough" of the scenarios/use cases to satisfy the product owner. What the product owner asks for is the complete specification. Don't try and second guess what the product owner might want because this may result in be a classic case of YAGNI.
I know I can get the courses the user has, but I want to know where the user is at this moment - clicking the link to our external application. I'm building on the Getting Started example in PHP, from the valence/desire2learn.com website. We're using d2l for many of the course materials but want to produce some tracking and graphs for students to see. It would involve getting grade info (which I think I can do), having students enter hours of study (in our application), storing that information and returning a graph comparing course grade and study hours over the course. It would be much better to automatically pick the right course than to have the student pick the right course.
Can it be done (obtain which course the student's in at the time the link is clicked)? In addition to the annoyance of having to pick which course, it's possible that students are taking more than one course at a time where the teacher is using this tool.
Thanks in advance for your assistance.
If you use LTI v1.0 (Basic LTI) to build the link to launch from D2L to your external application, then the LTI context passed to your application will contain a context_id property: the value of this property will be the org unit ID that identifies the D2L organizational unit for the launch point's context (in this case, the ID of the course offering). Note that until LE v10.2.0 SP1, D2L won't send along the context_id for the top org level, but if the user launches an LTI link from a course offering context, you should get the org unit ID for the course offering.
I started using Path, and noticed that in the registration process, they identified both my phone number and my email.
As far as I know, there is no way to programmatically get those values (without being rejected by apple), so how does path do it?
Moving my comments into an answer :)
As I've stated above, this is a duplicate of How does Square's CardCase app automatically populate the user's details from the address book?
Because Path asks beforehand for the first and last name it's easy to search for the contact in the address book. Of course one has to handle the case when a) no contact or b) multiple contacts are found. In both this cases I'd probably go with standard input fields, because for the "no contact found" case you need those anyway.
How common it is to have a contact with it's own name I don't know, but according to the Fact that Path and other apps are doing it the same way I suppose it's worth taking the risk :) AFAIK MacOS X automatically creates a contact with my name in the Address Book, but really can't recall if iOS has the same behavior.