Add users in groups in AD on premises from SPFX solution - active-directory

I am trying to add users to AD Groups; unfortunately MS Graph doesn't work correctly because of the hybrid environment (Azure AD synced with AD on prem). Is there any way to add people to on prem groups in a SPFX React solution ?
I get this error in MS Graph:
"{
"error": {
"code": "Request_BadRequest",
"message": "Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration.
.......}"
Also, how fast the sync will work ? The solution will be deployed on SharePoint Online.

Unfortunately, it's not supported to update an on prem AD Group with Microsoft Graph API.
To add users into AD group, we need to operate it in the on-premises environment and then sync it to Azure.
Similar posts for your reference:
Unable to update the specified properties for on-premises mastered Directory Sync objects or objects currently undergoing migration
On-Premises User Profile Update Using Microsoft Graph API

Related

Microsoft Azure AD Applications

I've registered an application (Any Azure AD directory - Multitenant) in Microsoft Azure AD to be able to work with MS Graph API for creating the groups and teams programmatically. Now I'm able to call the MS Graph API and create the groups. The issue I'm having right now is I have a naming policy like this <Department> - <Group name> in Azure AD and as I call the MS Graph API with the application identity and as I don't have any department for my app, the department part is always empty. I would like to know if there is a way to set department or other attributes for the app in Azure AD?
Thank you in advance!
There is no option to add attribute for the app in azure ad.

How we can sync on premise active directory data with Azure AD via graph API

We are having on premise employee directory and now planning to move to Azure AD. How we can sync the details of all employees to Azure using graph API, and provide them access to hardware and network.
We basically want to sync Entries, Computer, user, Group, InetOrgPerson, OU present in local AD to Azure AD.
Graph REST API which details how to do the sync operation is provided here:
https://learn.microsoft.com/en-us/graph/api/resources/synchronization-overview?view=graph-rest-beta

Acces on-premise AD users via Azure product to move them to Azure AD B2C

We need to move users from an on-premise Active Directory on Windows Server (not Azure Active Directory) to Azure AD B2C. But, we're having difficulty in trying to figure out how to read the user data from the AD using Azure products.
We're thinking about using one of the following Azure products to read from on-premise AD, but it's surprisingly difficult to find if this is possible or not, much less how to do it:
Azure Data Factory
Azure Logic App
Microsoft Power Platform Dataverse (formerly Common Data Service)
Power BI Data Flows
Note: We can't use Azure AD Connect to migrate the users because that tool isn't designed to work with B2C. Reference Microsoft's Azure AD B2C: Frequently asked questions (FAQ).
The Microsoft article Migrate users to Azure AD B2C says that a script needs to be written that uses the Microsoft Graph API to create user accounts in Azure AD B2C. But the article doesn't give advice on how to access the source data, which in our case is AD.
There is no out-of-box Azure product/solution that connects to on-prem AD. Maybe there is a way which requires you create custom connector and custom API for querying AD users. See this post.
The quickest way is using PowerShell cmdlet Get-ADUser to export the AD users and then import them into Azure B2C via Microsoft Graph Create User.

How to create a new on premises Active Directory from an existing Azure AD tenant populated directly on the cloud?

Years ago, a customer created and populated an Azure AD tenant directly on the cloud. Now the need to create an on premises Active Directory.
Is there a way to create from scratch a brand new on premises Active Directory which should be and remain synchronized with the already existing Azure AD?
Thank you,
Stefano
Anytime you can build-up on-prem Active directory and sync object to Azure Ad directory with the help of Azure AD connect. More information about sync you can find on this article
if stuck somewhere, you can contact Microsoft Support.

How to view Azure AD schema

How can I view the Azure Active Directory schema.
Does Microsoft provides any document for Azure AD schema(similar to this)?
I want to view all attributes of the User and Group in Azure AD with description. Similar document for Active Directory Domain Services is Active Directory Schema
I am currently exploring the Azure AD Graph API and Microsoft Graph. I want to understand the difference between Active Directory Domain Services and Azure Active Directory with their attributes.
Also, does Azure AD has USNChanged attribute?
Here is User in Azure AD Graph: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#user-entity
And here is User in Microsoft Graph: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user
You can find the other entities like Group quite easily from there.

Resources