Github API /Users Identifier Attribute - github-api

Is there an attribute that I can identify the user from the Github /Users endpoint?
I see two attributes could be the identifier of a user, namely the "id" and "node_id" attributes. The official documentation does not elaborate further on what these attribute represent, and I have tried researching online to no avail.
Can anyone confirm if there is an Identifier Attribute that I can use from the /Users Github Api?

Related

How to change a custom policy to be able to log in with a custom attribute (National Identity Document)

Currently I only find documentation that allows me to change my email / username / phone number, but nothing talks about adding a user attribute as an authentication entity for the login.
Write the new identifier to signInNames.whatever, exactly like the “change identifier” samples work. They just overwrite an existing value, if one didn’t exist, it just gets created automatically.
You can’t add an identifier to /any/ attribute, it has to go into signInNames attribute, as that is uniquely constrained.

How to check whether user is ACTIVE when retrieved from microsoft graph API

Need to fetch only ACTIVE users through microsoft graph API.
GET /users
how is it possible and how can we we verify whether returned users are active only
I think you can find the answer in the official documentation of the API.
There's a filter parameter that you can pass to your request. Filter supports the property accountEnabled of the User entity, so you can use this property to find active user.
Here's the request you have to use:
GET https://graph.microsoft.com/v1.0/users?$filter=accountEnabled+eq+true
You can retrieve the user's details from Graph API using id or userPrincipalName (which is an email address).
From Microsoft Graph API reference:
GET /users/{id | userPrincipalName}

Use accessToken to obtain Dynamics Organization Uri

I have a nodejs project that is using adal-node (https://www.npmjs.com/package/adal-node) to authenticate via OAuth2 to Dynamics CRM. I have successfully gotten the authorizationUrl, then posted the code to get the accessToken. However, this last response does not return an instanceUrl. So I've been scowering the MSDN pages online for documentation on how to use the accessToken to obtain the correct organization instance Uri. I've tried this (https://msdn.microsoft.com/en-us/library/mt607485.aspx) and just get a 401 "Authorization has been denied for this request" response. Maybe I'm formatting this request improperly? Can someone kindly direct me to some documentation on how to use the valid accessToken I've obtained to retrieve the organization instance Uri for this user? Thanks.
Recently went through this myself, the issue I think you might be experiencing is the resource that is being requested access to when you request your authentication token is incorrect. While you would think it would be https://globaldisco.crm.dynamics.com/, I actually been successfully with https://disco.crm.dynamics.com/ (ensure to include the trialing slash) as the resource.
If your token is rejected then look at the WWW-Authenticate attribute in the response header and it will indicate the resource you should be requesting. Similar to this:
Bearer authorization_uri=https://login.windows.net/common/oauth2/authorize, resource_id=https://disco.crm3.dynamics.com/
After getting the right resource I was able to query the global disco service without issues and even though giving the NA disco resource returned instances from various regions. This worked on Azure AD tenants started in NA as well as the UK.
I have blogged a full sample here - http://colinvermander.com/2017/01/19/calling-the-dynamics-global-discovery-service/
According the description at https://msdn.microsoft.com/en-us/library/mt607485.aspx, to request against to https://globaldisco.crm.dynamics.com/api/discovery/v1.0/Instances(UniqueName='myorg'), you need to replace myorg to your own unique name of your dynamic crm server.
You can refer to https://www.dynamics-pros.com/support/kb/kb102033 for how to get the unique name.

NodeJs : Liferay api to fetch the "custom field" created for Role

According to my requirement in Liferay, I have created custom fields for roles and assigned it to a user. My goal is to call the JSONWS API and get these custom fields using NodeJS. I am not able to decide which API I should call.
This Url is having APIs: http://www.liferay.com/api/jsonws
I will appreciate for any kind of help.
Regards
AFAIK there is no options to access the expando value via exposed webserveices.
Probably what you can do is that, create a custom portlet, add a dummy entity in the service builder and in that expose a method for web service. In that method call the role API and expando API , and return the result you want.
Custom Fields are called "Expando" in the API and are modeled like virtual tables. The functionality that's exposed through webservices is ExpandoColumn and ExpandoValue. Probably the best way to figure out the parameters to give is to look at the matching database tables. Careful: You should only ever read the database and not be tempted to write to it.
I hate giving the advice to go to the database, but this is probably the quickest - at least for my explanation :)
Finally, I got a genuine solution without hitting database directly. JSONWS is having api :
/portal.expandovalue/get-data
Which helped me to get attributes assigned to a particular role.
The above API needs 5 parameters to be passed.
companyId: whaterver the companyId assigned for your liferay.
className: It depends upon, we created attribute for role or user
com.liferay.portal.model.Role or com.liferay.portal.model.User
tableName: CUSTOM_FIELDS
columnName: It is the same name you given for attribute
classPK: It is nothing but your role or user ID for which you have created Attribute.
In case you are getting "java.lang.NullPointerException" when using #user3771220 solution, try com.liferay.portal.kernel.model.User

Instagram tag is global scope or user scope

I am not sure whether instagram tag is global scope or user scope
when I call the api below, I got the same result, no matter what the access_token I use.
https://api.instagram.com/v1/tags/{theTag}/media/recent?access_token={mytoken}
https://api.instagram.com/v1/tags/search?q={theTag}&access_token={myToken}
Both of the Instagram API endpoints you referenced are global. They will not return tags just for the authenticated user. I am not aware of a way of also filtering by user when searching by tag or when searching for tags.

Resources