I wanted to fetch all roles in Netsuite via Rest/Soap API.
Currently im able to fetch roles through the employee records but not roles directly.
And also is there any way we can fetch the permission of a Role as well?
This can be done if you have the username (email) and password of the netsuite user.
There's a special /roles api (https://rest.netsuite.com/rest/roles) that allows you to list all netsuite roles associated with a user. Here's some example code demonstrating how to use this API.
you can also, check all roles with SuiteQL
https://<<"yourAccount">>.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql
POST this JSON as body
{ "q": "select * from role"}
you must have a role with enough permission
Related
To give our app permission to update a user's envelopes, they need to go through the OAuth flow and after that, we need their user id.
For my developer account and my demo account, I can find this under Settings > Integrations > Apps and keys. But my client, who has a paying DocuSign account, doesn't have that menu. Is there another way to find the user id?
Thanks!
After the user logs in via oauth, use the userinfo endpoint to obtain their user id and the account IDs they have access to. See https://developers.docusign.com/platform/auth/reference/user-info/
I'm currently building an integration with Netsuite using the Suitetalk REST API. I would like to retrieve the role of each contact associated with a customer to find the Primary and Operational contacts of the customer.
I have tried querying the customer endpoint:
record/v1/customer/ {customerId} /contact/ {contactId} /contactrole
This query returns Role id 14 which is 'Customer Center' for all customer contact records. This is obviously incorrect as this information is returned for contacts tagged with different roles when I check them via the UI.
I have also tried using Suiteql using the query endpoint with the similar results.
Is the query incorrect or should I be using a different endpoint? I have been stuck for days, so I would appreciate any suggestion.
A long comment. Hopefully it helps focus your search for a solution.
Contact Roles is the subrecord for contacts who have login access to a customer's account. The role listed there is the access role. Customer Center is the default access role in a vanilla Netsuite account.
The Records Catalog has contactList as the joining table for contact to company. I don't see any mention of role there that would correspond to contactrole in the records browser so it appears some documenation is missing.
You'll likely have to play with the SuiteQL queries feature to get this.
See Executing SuiteQL Queries Through REST Web Services in the NS help.
with suiteql you can get primary contact with this
{ "q": "select cus.companyname,cus.contact,cont.entityid from customer cus left outer join contact cont on cus.contact=cont.id where cus.id=<<id of ur customer>>"}
How to check the users role(owner, reader) in that specific azure subscription by using user mail id has parameter in azure rest apis?
is there any api to get the data has mentioned above?
(or)
is there any api to fetch total users list with user roles in that specific subscription ?
There are two APIs available to fetch user roles
Azure Active Directory Graph API (old)
Microsoft Graph graph.microsoft.com (new).
I'm using the Graph API to pull down information about a specific user in my organization. This works great, however one piece of information I need is the users "Security Groups" from their Active Directory account.
I use the following URL to request the Graph API information for a given Active Directory objectID.
https://graph.windows.net/[domain]/users/[objectID]?api-version=1.5
This gives me an JSON result that contains the users information such as their Department, jobTitle, userPrincipalName, etc.
How can I also request the users Security Group memberships? Is this possible?
They are available on the memberOf navigation property. So you can make a call to this:
https://graph.windows.net/[domain]/users/[objectID]/memberOf?api-version=1.5
User entity documentation
I am accessing the Netsuite using RESTlet by Oauth token. I could get a contact, customer, and other details. Now I want to get profile [acccount holder] details like my first name, last name, mail id, role, and so on.
What is the record type should i use to get above mentioned details?
Or what alternate code should use to get the details?
It depends on type of user, mostly you would need to query
employee
, it has all the details. when querying/searching you may want to add filter that ['giveacess', 'is', 'T'] as you only want to query users with login access.
Other types of users can be customers, partners and vendors
These users can have access to their portals, eg: customer has access to customer portal, vendor to vendor portal and partner to partner portal.
For details on fields available to query , I suggest you to check record browser link