Azure SQL Managed Instance and Azure Active Directory Authentication - azure-active-directory

Question: In Azure SQL Managed Instance, what is the procedure for setting Password Expiration when using Azure Active Directory (AAD) Authentication? As shown below, in SSMS, I see Password Expiration option is grayed out:

To set Password expiration policy for Azure AD user accounts, you need to have Global Administrator role on your tenant.
If you don't have that role, contact admin and get yourself assigned with Global Administrator role like below:
Go to Azure Portal -> Azure Active Directory -> Users -> Select user -> Assigned roles -> Add assignments
Login to Microsoft 365 admin center with above Global admin credentials and follow below steps to set password expiration policy:
Go to Microsoft 365 admin center -> Settings -> Org settings -> Security & privacy
By default, this option is set to passwords never expire for entire organization like below:
If you want to set password expiration for particular number of days, uncheck the box and enter the number like below:
If you want to set password expiration policy for specific user, you can use below PowerShell commands:
Connect-AzureAD
#To check the expiration policy for a password of specific user
Get-AzureADUser -ObjectId <userID/UPN> | Select-Object UserprincipalName,#{
N="PasswordNeverExpires";E={$_.PasswordPolicies -contains "DisablePasswordExpiration"}
}
#To set password to expire
Set-AzureADUser -ObjectId <userID/UPN> -PasswordPolicies None
Response:
Reference:
Set an individual user's password to expire - Microsoft

Related

Users can create Azure AD tenant

It looks like by default the tenant. creation is "Yes" from AAD -> User settings
Where it says all users can create the tenant. Should not it be the default "No" ?
Is it a new feature introduced in Azure? and from when? And why its default "Yes"
Screenshot
By default , users are given some set of permissions. But it all depends on whether the user is the member or a guest user or restricted guest user .
When a new tenant is created , the one who creates that tenant will be the only user and has global admin rights and can have access to creating tenant.
Guest user and restricted guest users doesn’t have directory permissions .
So if you need to change member access from user settings according to requirement, you can change that to no.
See Default user permissions - Azure Active Directory - Microsoft Entra | Microsoft Learn
Earlier tenant creation option itself was not present for user , but restriction to administration portal is by default set to NO and has to be set yes explicitly anyway to restrict users to admin portal.
Check this Restrict access to Azure AD administration portal - ALI TAJRAN
In the same way tenant creation must be set to no by newly created tenant admin.
When I created new user and loggen in , its default settings are according to what admin set with his admin privilige.
So When I set them using admin user account details
And then created user ,cannot access portal itself , as access to admin portal is restricted.
Or you can make only tenant creation restriction accordingly.

Is it possible to enable MFA for the guest users?

I have created guest users in my Azure AD tenant by sending invitations via email following this link https://learn.microsoft.com/en-us/azure/active-directory/external-identities/b2b-quickstart-add-guest-users-portal.
The guest users are added to my tenant once they accept the invitation.
Now I have assigned some applications to the guest users that they can access.
To enhance the security, I want to enable two-factor authentication for the guest users when they are accessing the application.
Is it possible to enable MFA for the guest users? If yes, can anyone guide me with the steps
Yes, it is possible to enable MFA for guest users.
To achieve your requirement, please follow the below steps:
Make sure whether you have Azure AD premium P1 or P2 license which is necessary to create conditional access policy.
To create conditional access policy,
Go to Azure portal -> Azure Active directory -> Security -> Conditional access -> Policies -> New policy.
In Grant tab, Select "Grant access" and Check mark "Required Multi factor authentication". Enable policy by selecting it On and Create.
I have tried in my environment, after creating policy I signed in as a guest user from Incognito window and it prompted for two factor authentication like below:

How to synchronize Azure Active Directory User that is given a CRM License to Dynamics 365 Online

My understanding regarding the synchronization are as follows:
Create Member User in Active Directory
Assign CRM License in Active Directory
User will be created in Dynamics CRM
However, I'm not sure when will point no 3 is triggered.
Should the new member user login for the first time inside the CRM to change password for it to be created in CRM? (This is the behavior that I observed)
Or will it auto synchronized after some time?
Thank you Henk van Boeijen for your comment adding more to your comment to make it as answer and understandable to other users.
The below answer is publish by soundharya subhash under Power Platform Learning
When an new Environment is created, it takes more than an hour or some times a day to sync users from Azure AD to CRM.
Through Power Shell cmdlets, we can sync user immediately.
Install Module
Microsoft.PowerApps.Administration.PowerShell
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Connect to Power Apps using any of these
User Name and Password
Add-PowerAppsAccount -Endpoint “prod” -Username “” -Password “”
Tenant Id, Client Id and Client Secret
Add-PowerAppsAccount -Endpoint “prod” -TenantID “” -ClientSecret “” `
-ApplicationId “”
Tenant Id, Client ID and Certificate Thumbprint
Add-PowerAppsAccount -Endpoint “prod” -TenantID “” -CertificateThumbprint “” `
-ApplicationId "
"
Get-AdminPowerAppEnvironment cmdlet gives list of environments available in Tenant, note down the environment name (guid) to which you want to sync the Users
Go to Azure Portal : https://portal.azure.com -> Azure AD -> Users -> note down the Object Id of the user you want to sync
Run the cmdlet in Power Shell
Add-AdminPowerAppsSyncUser -EnvironmentName <Guid> -PrincipalObjectId…
Reference : https://nishantrana.me/2021/01/20/force-sync-users-from-azure-ad-to-dynamics-crm/

Azure create servicePrincipal results in Insufficient privileges to complete the operation

I am trying to create a new service principal using the command below using azure cli v2.0.
az ad sp create-for-rbac --name ServicePrincipalName
Changing "ServicePrincipalName" to a valid URI of "http://ServicePrincipalName", which is the required format used for service principal names
Found an existing application instance of "abcd-8f27-47cf-9976-xkkfigif5e1de". We will patch it
Insufficient privileges to complete the operation.
I am not sure what privileges the Azure Admin of my tenant should assign to my user so i can create a servicePrincipal any guidelines or document pointers please
First, you have to know what this command will do. The command az ad sp create-for-rbac --name ServicePrincipalName will create an AD App(app registration) along with a service principal in your tenant, the AD App will have an Application ID URI named http://ServicePrincipalName, a Display name named ServicePrincipalName. Then the command will add the service principal to your subscription as a Contributor.
The error you got means there is already an AD App with the Application ID URI equals http://ServicePrincipalName existing in your tenant. And you are not the Owner of the AD App. (Note: in the tenant, the Display name is not unique, but the Application ID URI is.)
To solve the issue and use this command successfully, follow the tips below.
1.Change the ServicePrincipalName to a different one. (Or if your admin allow you to use the existing AD App mentioned above, just let him add your user account as an Owner to the AD App. - not recommend)
2.If your account's User type is just a Member in the tenant. Make sure in the portal -> AAD -> User settings -> Users can register applications is Yes. If your account is a Guest , except the Users can register applications need to be Yes, also User settings -> External collaboration settings -> Guest users permissions are limited need to be No.
3.Your user account should be the Owner of the subscription. Otherwise you can create the service principal successfully, but you cannot add it to the subscription.

User name or password is incorrect when performing domain join to Azure VM

Installed AAD Domain Services with domain name "mydomain.com"
Added verified custom domain "mydomain.com"
Made "mydomain.com" primary
Created AAD user "admin#mydomain.com"
Converted temp password to permanent password
Logged into Azure with permanent password
Added "admin#mydomain.com" to domain administrators group
Ensured VM can see domain services for "mydomain.com"
When performing domain join, receive "The user name or password is incorrect"
I've tried the following credential combinations when doing the domain join (username : password)
admin : pwd
admin#mydomain.com : pwd
mydomain.com\admin : pwd
mydomain.com\admin#mydomain.com : pwd
None of these work and ultimately give me a lock out indication. I create additional users to continue trying these steps but nothing is working.
The user "admin#mydomain.com" you created must belongs to the Azure AD DC administrators group. Only members of this group have privileges to join machines to the managed domain.
For the details, you could refer to here.
The last step in the instructions from the link below was missed. Had to enable password hash synchronization to Azure Active Directory Domain Services and wait about 20 minutes. All worked correctly after that.
https://learn.microsoft.com/en-us/azure/active-directory-domain-services/active-directory-ds-getting-started-password-sync

Resources