How to retrive the SecuritySettings of the organization in Salesforce. There is a metaDataAPI available, but it uses soap for retriving. I need to retrive the SecuritySettings using Oauth 2.0 RestAPI or SOQL
Use Tooling API.
SecuritySettings doesn't show up on the list in documentation but GET /services/data/v54.0/tooling/sobjects/SecuritySettings/describe looks very promising. And from there you can query it or deploy/retrieve or whatever you want, it's similar to Metadata API.
/services/data/v54.0/tooling/query?q=SELECT Id, DurableId, Metadata, FullName, IsAuditFieldsInactiveOwnerEnabled, NetworkAccessId, IsRequireHttpsConnectionEnabled, SingleSignOnSettingsId, CanUsersGrantLoginAccess, IsAuraSecureEvalPrefEnabled, IsAdminLoginAsAnyUserEnabled, PasswordPoliciesId, SessionSettingsId FROM SecuritySettings
Related
I want to do a search for all unique email recipients from gmail. But I'm really struggling with API. If I was interacting with a SQL database I would want something like:
SELECT DISTINCT EmailRecipient FROM MyHypotheticalGmailTable;
But I'm not sure how to translate this into a gmail API call.
I suggest you start by taking a look at the Gmail API Quickstart with Python here.
Afterwards you may want to take a look at threads.list in order to list all the threads available and then for each one use threads.get. Since there is no direct method of retrieving the unique email recipients, you will have to handle this separately from the API calls and filter the results programmatically.
Reference
Gmail API Python Quickstart;
Gmail API messages.list;
Gmail API messages.get.
I am working with Salesforce API and need to fetch all the support tickets against a user but I am not able to find any REST API for fetching the tickets.
Can anyone let me know if there is such REST API is there?
There is no standard object in Salesforce called a Support Ticket. You may be using the Case standard object, or a custom object; regardless, it won't have its own API endpoint.
You'll want to use the Query REST endpoint to execute a SOQL query to locate the records you need.
How can we get name of email templates using API? Can anyone please guide?
Which API. Come on, put bit more effort in your question
You just need to run queries? Email templates are metadata, can be queried in EmailTemplate table.
SELECT Id, DeveloperName,FolderName,Name,NamespacePrefix FROM EmailTemplate
If you're using Metadata API (retrieving config, deploying classes etc) you need to explicitly list them in the package.xml. If you don't know the names - you can query like above or use listMetadata call. Example if you're using Ant migration tool: https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/forcemigrationtool_listmetadata.htm (it'll work per folder)
I am new to Azure Active Directory. I have a demand for following functionality: I need to get an objectId of the user who is not invited into my resource group/subscription. Just some Azure user providing an e-mail. Is there any kind of API to do this? I have tried to look into Graph API, but didn't notice a suitable method.
Technology stack is ReactJS. Currently, using ADAL, but it is suitable for authorization and I didn't find a functionality to get information about non-curent users.
Thanks in advance!
You can obtain user's details from Graph API using id or userPrincipalName (which is an email address).
From Microsoft Graph API reference:
GET /users/{id | userPrincipalName}
In Salesforce I have created a few Contacts. And linked some of the contacts with LinkedIn profile. As soon as I link the contacts, the image display in Salesforce changes the profile image to that provided by LinkedIn. Basically I think it would work the same way if I linked it to Facebook or other social sites.
Now my requirement is to get the the PhotoUrl of the Contact. I went through this documentation Contacts Standard Object. It shows there is a field "PhotoUrl", but when I make a query in SOQL using SOAP API, like "Select Name, PhotoUrl From Contact", this query fails and the response message tells that there is no such field as "PhotoUrl".
What am I missing? Is there any way I cant get the Photo?
Thanks
SOLUTION:
THE PROBLEM WAS WITH THE API VERSION 29. I HAD TO CHANGE IT TO 30. HOWEVER IT WAS TRICKY WITH SOAP API. I HAD TO CHANGE THE AUTHENTICATION ENDPOINT VERSION TO 30.
Change the version of salesforce API. It works for me in 30.0 and not in 29.0..
If it is in a visualforce page, set your standard controller to Contact and then {!contact.PhotoUrl} will return the url.