Deleting an Orphaned user in AD affects the sync or deletes the user from AAD? - azure-active-directory

I have an Orphaned AD user (Deleted the DC in 2018), however the user is active in AAD, I need to move this user to another DC, If I remove the user from the OnPrem AD, will it remove it from AAD? AAD last sync was in 2018, however the user is active and has been logging on regularly.
Another question, can I create a new user in the OnPrem AD, and then link the AAD with this new user?
User impact must be 0.
Thanks!

I tried to reproduce the same in my environment and got below results:
I created one test user "Sarita" in my on-prem AD and ran the AD Sync Cycle using command like below:
Start-ADSyncSyncCycle –PolicyType Delta
Response:
After running the above command, Sarita is synced to Azure Active Directory successfully as below:
Now I deleted the Sarita from my On-premises AD and ran the Sync Cycle again as below:
After the Sync cycle, Sarita from Azure Active Directory got deleted automatically like below:
I tried to login with the same account now and it shows error like below:
Can I create a new user in the OnPrem AD, and then link the AAD with this new user?
No, we cannot create new user in the OnPrem AD and link to Azure Active Directory with this new user.
Please note that, whenever new user is created in the OnPrem AD, an SID value is created for that user.
If you create new user now, SID values will be different, and we cannot link it to AAD as it will be created with different attributes.

Related

Add users is faded out on Azure Active Directory newly created app

I'm testing my SCIM integration with Azure AD. I created an app in Azure active directory, provisioning credentials are OK, but Add user option is not active (faded out).
When I create Databricks scim intergration, it's ok and it works. Any ideas?
This could be due lack of permissions or appropiate role being assigned. Ensure you're assigned one (Tenant or application scoped) or be added as owner of the application.

Is is possible avoid deleting a user via SCIM provisioning when AccountEnabled=false in an Azure AD Enterprise Application?

My Azure AD admin have created an Enterprise App for me and I'm Configuration Owner for it.
The app Provisioning is setup to:
Provision Azure Active Directory Groups
Provision Azure Active Directory Users
to my SCIM server.
The setup is working fine, users are created via and groups are updated also.
My problem is that in my company workflow when a consultant contract is renewed the user's AccountEnabled property is set to false and then later re-enabled with AccountEnabled=true, this is translating right now into a Delete / Create via SCIM in my app.
My impression was that AccountEnabled=false would translate to a isSoftDeleted=true (as mentioned in Customizing user provisioning attribute-mappings for SaaS application in Azure Active Directory) and that in turn will translate to a SCIM Disable User request because of the attribute mapping settings of the app is to map the Azure Active Directory Attribute Not([IsSoftDeleted]) to active attribute in the app.
But it's not disabling the user it's deleting it.
The user resides in a on-premises Active Directory then synced to Azure AD.
All the information that I could find (like this) suggest that a SCIM Delete should only happened after 30 days when a user is hard deleted and not when AccountEnabled=false so I guess it may be another factor at play.
So, how do I stop Azure AD from issuing Delete user for disabled users in my app?.
EDIT: I tested with a local user in Azure AD (not synced from the on-premises AD) and with that user when the user is disabled it triggers an update user not a delete. So it must be related with synced users only (I'm still troubleshooting)
Certain applications don't support soft deletes so the Azure AD provisioning service sends a delete in place of an update. What app are you using?
The attribute mapping blade allows you to de-select delete as an option, do the deletes stop when you do that?
I recommend keeping the attribute mappings as close to the default as possible.
Try removing the "not" function and using the default attribute mappings. The default mapping uses a switch statement to map false to true and true to false. It sends the request as a string rather than a boolean.

Change owner of Azure AD

How do you change the owner of an Azure AD directory? I have two accounts and see the tenant/directory I want listed as a directory. I want to transfer the ownership to the other account.
UPDATE
Ok. More information. I had one subscription and created 3 B2C directories. Each time I linked to the subscription, which is part of the process. Apparently you cannot have more than 1 B2C tenant linked to a subscription, so the other two were left "stranded" outside of a subscription. So I had to create a new subscription and associate the B2C directory with it, so it was a resource of the subscription. Then I used IAM to add the 2nd Azure account as a co-administrator of the subscription. I transferred the subscription to the 2nd Azure account.
The biggest authority in Azure AD is Global administrator. If you want to transfer ownership to another user, you only need to give that user Global administrator.

Azure AD Differential query - Detect change in Directory role assignment for a user

I am using differential query (AzureAD graph API) to detect changes in Azure AD from the last sync. I am getting all users, group memberships, manager changes. Only missing information is Directory Role assignment (e.g Billing administrator, SharePoint administrator etc).
How can I detect a change in roles of any user?
API - https://graph.windows.net/{org}/directoryObjects?api-version=1.5&deltaLink=xxxxxttttxxxxxxxx
First, if you have enabled those Directory Roles, you can use AAD Graph API operations on directory roles to list members of those roles.
GET https://graph.windows.net/myorganization/directoryRoles/{object_id}/$links/members?api-version=1.6
But, This API can also list service principals which assigned this role.

No subscriptions found in the old Azure portal

I am using a visualstudio account in Azure. i have created a new user and given admin access to the active directory to this user. I also added this user as the owner to the subscriptions i had.
I now login as this into the new portal. I can see the subscription that i have. However i do not see the icon for Azure ActiveDirectory. Therefore i try to login to the old portal. This time I get stopped by a "No subscriptions found" prompt which does not let me for farther.
What is going on? why is there such discrepency between the two sites?
The classic (i.e. old) site only works with the old access model (service admin and co-admin), and requires at least one subscription to get into the site. The new site uses the fine-grained RBAC model (owner, contributor, etc...), and does not require any subscription just to get in to the site.
Adding a user as an 'Owner' in the new Azure portal does not make them a co-administrator, and thus, does not give them access to the classic portal:
The owners you added through the Azure portal cannot manage services in the Azure classic portal.
In order for your new user to get into the classic Azure portal, they need to have service admin or co-admin access to an Azure subscription. You can do one of the following:
Add the new user as a co-admin to your existing subscription (you would do this in the classic portal)
Make the new user the service admin for the subscription
Transfer the entire subscription to the new user (which also makes the new user the account admin)

Resources