In my app, the user should be able to choose a company, in which his article gets published.
The Azure Active Directory has the Company name for that, which is maintained by our AAD Team. Is there any way to request all values from this field? Like a SELECT DISTINCT in SQL?
AFAIK, currently there is no way to request all distinct values using companyName attribute.
You can use filter parameter by looping through each companyName.
Please note that Distinct is not supported in Microsoft graph API.
You can raise Azure Support ticket or feature request for the same by visiting below link:
Azure Support Options | Microsoft Azure
References:
Is there a way to query distinct user profile attribute values from the Graph API? For example $select=Distinct(jobTitle)? The scenario would be to build a "refinement" experience for a People Search experience. - Microsoft Q&A
Distinct values in Microsoft Graph query - Stack Overflow
Related
Is it possible to search for drive items using a more advanced query?
I know that a simple search is possible e.g.
GET https://graph.microsoft.com/v1.0/sites/tenant/drives/drivenid/root/search(q='contoso')
but what about searching across a custom field e.g.
GET https://graph.microsoft.com/v1.0/sites/tenant/drives/drivenid/root/search(q='myfield:contoso')
I know that there is a different search API available that supports KQL ( Graph Search API ) but that only supports delegated user authentication & does not support application authentication ( Permissions Reference )
I assume that the answer is no, it is not possible
If not, does it mean that to do advanced searching in SharePoint online with KQL I would have to revert to the SharePoint Search API e.g.
https://tenant/_api/search ?
I have some doubts regarding the custom connector we are trying to build for docusign : -
Regarding the license plan that need to be bought by the customers who will be granting access for our connector to collect data from their docusign organization account. I am looking at the link https://www.docusign.com/products-and-pricing. API access support is mentioned in only the advanced solution. So I was wondering whether only we need to have "Advanced solutions plan with APIs support" plan or all our customers need to API access support in order to fetch their data.
As per the documentation, to make the REST API calls we need two fields 'base_uri' and 'account_id' (https://developers.docusign.com/esign-rest-api/guides/authentication/user-info-endpoints). Now, the response of userInfo API call gives an array of accounts and its respective fields. My doubt is, if multiple authenticated users (more than one accounts) are returned in this array but all are part of same organization, will they all have different account_ids. Main concern here is, will there be several Base Paths (https://developers.docusign.com/esign-rest-api/guides/authentication/user-info-endpoints#form-your-base-path) to make API calls?
2a. Further question is, what is the significance of 'is_default' field?
Is this related to main account (if is_default is true) using which we will create our Base Path?
Since this is a tech/engineering forum I'm going to answer only question #2 as question #1 is more of a business/sales question.
The reason you may get multiple accounts is that an authenticated user in DocuSign can be a member of multiple accounts. That said, it's the same user. Meaning, say foobar#blah.com has an account 123 with company X and account 456 with his school, then it's possible that when foobar#blah.com authenticates (With the same password!) to DocuSign we have a list of accounts associated with that user. We give you all of them when you make the API call. The default one is the main one that you would see when you log into our web app. You can decide yourself as the user which one is the default. Users who log into our web-app then see an option at the top-right to change accounts.
and yes, every API call is associated with a specific account. So when you construct the urls for your API - you do need to know which account for this user you are making the API call for. Your application can decide how to handle this.
Hope this helps.
Is there a way to get the SharePoint security groups at site collection/site level with Graph API? I have followed Graph API article by MS but no where they mentioned about pulling information from security groups. I want to use this Graph API url in my power apps to apply role based security.
It isn't possible to interact SharePoint's own user or group resource via Microsoft Graph at the moment. For the time being you would need to use the classic SharePoint REST API (i.e. /_api/web/siteusers) for this.
Most of the posts I've read online about this are about a year old, or don't answer my question specifically. I know through the graph API you can view contacts and users, and you can add contacts and users, but when I've viewed the contacts and users through the graph API, they don't match what's in my global address list exactly. So I believe that they're not the same thing.
Also, a lot of the posts I've read asking questions similar to this have said adding users to the Global Address List is not supported through the Graph API and must be done programmatically through powershell or something like that. These answers though were posted around a year and a half ago. So I'm wondering if this still isn't possible through the graph API.
So firstly I'd like to understand why you indicate that the Global Address List is different from what you can get back from Graph API. As far as I know these should be identical, so please indicate where you are seeing differences. Also Azure AD PowerShell v2 calls through Graph.
As for updating the global address list, this is mostly possible through Graph API. If you are trying to add new users to your directory, you can POST on http://graph.microsoft.com/v1.0/users. Please see https://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/users and https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_post_users. There are also PowerShell cmdlets for this. If you are trying to add organizational contacts, currently this is not supported through Graph API or through Azure AD PowerShell. Organizational contacts may be queried (currently only available in preview by doing GET https://graph.microsoft.com/beta/contacts), but adding org contact is only possible through creation in on-premises AD and synchronization though AD Connect OR via Exchange experiences (like Office portals or Exchange PowerShell).
Personal contacts may also be fetched and added through GET and POST https://graph.microsoft.com/v1.0/me/contacts respectively.
Hope this helps,
At present, it is not possible to add the users to Global Address List. We are only to add the person contacts to the root Contacts folder or to the contacts endpoint of another contact folder( refer here).
You can try to submit the feedback from here if you want the Microsoft Graph to support this feature.
Does anyone know how to order the results of a query to the Azure AD Graph API using the nuget assembly (https://www.nuget.org/packages/Microsoft.Azure.ActiveDirectory.GraphClient/) by "Created Date" (i.e. when the user was created in the directory?
I can't find any documentation about a property which would contain this. Is the result set automatically ordered in this way?
There is a restriction at the moment on the '$orderby' expressions that can be specified for a Graph API query. From the documentation -
The following restrictions apply to $orderby expressions:
Two sort orders are currently supported: DisplayName for User and Group objects, and UserPrincipalName for User objects. The default sort order for users is by UserPrincipalName.
So even if the 'Created Date' was exposed as property on the User I doubt the query will work.