Azure REST API for Azure AD settings - azure

I need to get information about the already configured User Settings from Azure AD through API.
I'm looking for the request with information about "Guests can invite" is set to "No" or "Members can Invite" is set to "No"
Could you please provide me information about the required API call for my purpose?

You can use Azure Powershell to achieve this:
https://learn.microsoft.com/en-us/azure/active-directory/b2b/delegate-invitations#assign-the-guest-inviter-role-to-a-user
Unfortunately it is not possible as of yet to make direct Microsoft Graph calls to add app role assignments. Please follow the GitHub issue : https://github.com/microsoftgraph/microsoft-graph-docs/issues/4155 for an official response.
It is possible to add a new directory role to a user via the AddDirectoryRole API : https://learn.microsoft.com/en-us/graph/api/directoryrole-post-members?view=graph-rest-1.0&tabs=javascript
Hope this helps!

Related

Get list of all user from Azure Devops

i try to get list of all users from Azure Devops with postman,
i tried this link : https://titi.net/{organization}/_apis/graph/users/{userDescriptor}?api-version=6.0-preview.1&userDescriptor=username&organization=titiproject
Please check if my finding helps ,
To get users using user descriptor we can use the below given API:-
e.g:-
GET https://vssps.dev.azure.com/{organization}/_apis/graph/users/{userDescriptor}?api-version=6.0-preview.1
For more information please refer this MICROSOFT DOCUMENTATION|Get a user by its descriptor & Use Postman with the Microsoft Graph API

How can i add Custom Attributes to my Azure AD tenant members (Not B2C users)

I have an Azure AD tenant and I am looking for a way to include extra attributes while creating members within my organization. I have poked around the interface and can't find a way to achieve this on the Azure portal. From my findings, I can see tones of documentation and blog posts on how to achieve this using the B2C feature and graph API for external customers. However, this does not meet my requirements.
I believe this is a basic requirement that should be possible on Azure AD. Can someone please point me to the right documentation to achieve this?
Azure portal doesn't provide such a feature but we can archive this using Microsoft Graph API: Create extensionProperty.
You need to specify the targetObjects as "User".
An example (you can use any of your app registrations for {object id of the app registration}):
Post https://graph.microsoft.com/v1.0/applications/{object id of the app registration}/extensionProperties
{"name":"customAttribute","dataType":"string","targetObjects":["User"]}
It will generate an extension property named extension_{client id of the app registration without "-"}_customAttribute.
Then you can update the extension property for a user:
Patch https://graph.microsoft.com/v1.0/users/{user id}
{"extension_{client id of the Azure AD application without "-"}_customAttribute":"value"}

Is it possible to update the SignInNames of already existing users in Azure AD using Powershell

Is it possible to update the AzureAD user's SignInNames using Powershell ?
I tried to update it but it doesn't work out and gives a Bad Request error. No specific error is given.
Let me know if that is possible!
Thanks!
According to the AAD graph, the signInNames could not be set after creating the account, may be it also could not be set via powershell, because if you catch the request of the powershell via fiddler, it essentially call the AAD graph api, too.

Is it possible to create agents via the API?

So I've been reviewing the DialogFlow documentation and wondering if it's possible to use the API fully programmatically and create agents via the API as well? A sample use case being the user on my platform being to able to create their own bot. I'm not able to find the functionality listed in their docs and wanted to double check with the community here.
You can now create and update agents with the API. See the REST and RPC documentation.
You can’t create an agent through the API but once it’s been created in the UI it can be edited through the API. Users will need to grant your service account the dialogflow editor IAM role and then tell you their project ID.

Is there a way to get Azure Subscription ID programmatically?

We would like to create some Azure resources using Azure Rest APIs through a C# program. We are able to get access token by following the below msdn doc
https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols-oauth-code .
But the Azure Rest APIs also requires Subscription ID which we are not able to get. Is there a way we can get it through program?
Thanks
Balaji
You can use the below request URI to get list of subscriptions for a tenant. https://management.azure.com/subscriptions?api-version=2016-06-01
Please refer to Get Subscription List for more information.

Resources