Smartsheet - Get id of the row creator - smartsheet-api

I need to get the creator id, but request with include=writerInfo returns only email. The problem is that the user email can be changed and createdBy will change but modifiedAt will not change. Thus, I will need to get a list of users each time to determine the createdBy id of the row.
Is there a way to get the createdBy id when receiving a sheet with rows?

According to what I'm seeing in the API docs, I don't believe it's possible to get userId at the row level in the results of a Get Sheet request.

Related

Purview API to show the contact names

I am only getting the Ids of contacts, owners, createdby and updatedby fields. Which API to use to get the corresponding names?
"contacts":{"Expert": [{"id": "aa874e20-85bd-4e63-a11d-ce715e2a85bb"}],"Steward": [{"id":aa874e20-85bd-4e63-a11d-ce715e2a85bb"}]}
i am only getting the Ids of contacts, owners, createdby and updatedby
fields. Which API to use to get the corresponding names?
Thank you #Sindhuja Laxmipuram posting your suggestion here as community wiki to beneficial for other community members for similar issue.
You can use the below command to list the contact or owner name for
the above.
GET {Endpoint}/catalog/api/atlas/v2/entity/guid/{guid}?minExtInfo={minExtInfo}&ignoreRelationships={ignoreRelationships}
For more information please refer this SO THREAD | How to use REST API to extract role assignment information from a Azure Purview account .

How to access Employee Id from Azure AD using Microsoft graph

At first I want to mentioned I did search for the answer but I did not get the concrete answer. So here I am asking again.
I am using MVC.net project and using Microsoft graph to get informaiton from Azure AD. I am trying to get EmployeeId along with DisplayName. For the scope I am using 'user.readbasic.all
With below query I am getting DiplayName for all the users but for EmployeeID I am getting null. Except for myself.
"https://graph.microsoft.com/v1.0/users?$select=DisplayName,EmployeeId";
When I use "me" then again get the EmployeeID.
"https://graph.microsoft.com/v1.0/me?$select=DisplayName,EmployeeId";
So using the user.readbasic.all I do get employee id but for myself but why not for others
This is due to for others Employee ID has not been set.
Example: Employee ID has not been set for a user ,so it is showing null.
Let me Set an employee ID for a user.
Now I am testing for with same API I am getting my EmployeeID value.
In below Picture you can see as I have set EID for Rahul Only and for others it is showing null.

BlueSnap API - VaultedShopper FirstName and LastName

I'm creating an integration for the BlueSnap payment API. I'm using the Hosted Payment Fields solution. So when I create a VaultedShopper I just supply the Hosted Payment Fields token. However, the other mandatory fields for the POST vaulted-shoppers call are FirstName and LastName.
If I supply FirstName and LastName, then the call works OK and the response includes the new ID - but with empty FirstName and LastName.
So I'm wondering what is the point of these fields?
If you provide first and last name in the request, they must be returned in the response. Keep in mind that JSON fields are case sensitive, so if you are sending "FirstName", the API will probably ignore it. Make sure you are sending "firstName" and "lastName".

CloudKit predicate: Search multiple reference fields with predicate of CKQuery

Using Apple CloudKit, I have a record user and a join table record to connect users and to save the state of the relationship. This means that users can request to be friends and the other party has to accept first.
Now I want to query for those relationship records the user was a part of. This means in the CKReference field Sender and the createdBy field (also CKReference).
How do I build a valid predicate for CKQuery to find records where either the sender or the createdBy is equal to the current user?
Apparently CKQuery doesn't support OR and CONTAINS works only on Strings...
As #Thunk pointed out. Not possible as of today

Extend User authentication object in Azure Mobile Services

Is it possible to add additional properties to the User object on the server in WAMS? I would like to store the Id primary key of my User table for (secure) use in my table scripts. At the moment the only id is the vendor specific authentication Id, but I'd like to be able to allow users to choose an authentication method. Currently my (simplified) table design is as follows:
User table:
id
googleId
twitterId
facebookId
name, etc...
League table
id
userId
name, etc
I'd like to store the user primary key in the userId field on the league table, and then query it to ensure that users only get to see leagues they created. At the moment, the user object in table scripts sends through a User object with the Google/Twitter/Windows authentication token and I have to do a query to get the primary key userID, everytime I want to carry out an operation on a table with a userId column.
Ideal solution would be that when the Insert script on my User table is called on registrations and logins I can do:
// PSEUDO CODE
function insert(item, user, request) {
var appUserId;
Query the user table using the user.userId Google/Twitter/Facebook id
If user exists {
// Set a persisted appUserId to use in all subsequent table scripts.
user.appUserId = results.id;
} else {
Set the GooTwitFace columns on the user table, from user.userId
insert the user then get the inserted record id
// Set a persisted appUserId to use in all subsequent table scripts
user.appUserId = insertUserPK;
}
}
Then, in subsequent table scripts, I'd like to use user.appUserId in queries
If all you are trying to do is authorize users to only have access to their own data, I'm not sure you even need the "user" table. Just use the provider-specific userId on the user object to query your "league" table (making sure the userId column is indexed). The values will be provider-specific, but that shouldn't make any difference.
If you are trying to maintain a notion of a single user identity across the user's Google/Facebook/Twitter logins, that's a more complicated problem where you would need a "user" table and the kind of lookup you are describing. We hope to ship support for this scenario as a feature out of the box. It is possible (but fairly messy) to do this yourself, let me know if that's what you're trying to do.