11. Federation using Azure AD - CloudDarsh/OracleCloud GitHub Wiki

Federation using Azure AD

Goal – We want the same user to login into OCI from which we logged into Azure. Go to Identity & Security --> Domains  Default --> Security --> Identity Providers

image

Click on Export SAML Metadata, to get the details of OCI and provide it to azure

Download the file.

image

Now we have to go into Azure  Enterprise Application  New Application

image

Here we can see so many applications, we have to select Oracle

image

Inside Oracle --> select Oracle Cloud Infrastructure Console and click on Create

image

The OCI Console page will open, here we have to go to Single sign-on and select SAML method

image

The SAML page will open, Here we have to upload the metadata file which we downloaded above,

image

After adding , we can see all the details will be filled but the sign on URL is not filled

YouTube Thumbnail (18)

Now we have to copy the Identifier URL till 443 and paste the same in sign on URL and add ‘/ui/v1/myconsole’ in the last of the URL and click on save.

Now Azure got the details of OCI and single sign on is created.

Now we have to assign a user to this single sign on who can only access.

(We want the same user from which we logged into Azure to login into OCI)

Now In the same OCI console, go to user and groups --> Add User/Group, and select the user then the user will be added.

image

Now we have to go inside the user we created --> Edit Properties

Here we can see our unique mail id from which we have to login is mentioned in other emails

image

Now again we have to go back in Single Sign On --> Attributes & Claims

Here we can see in the Unique user Identifier, ‘user.userprincipalname’ is showing

image

We have to click on it and change the source attribute to ‘user.othermail’ and save it.

image

Now when we check again in the attributes and claims, the Unique User Identifier will change to ‘user.othermail’.

image

Now the SAML is ready in Azure AD.

Now we have to pass Azure SAML to OCI, Download Federation Metadata XML

image

Now we have to come back into OCI in the Identity Provider and Add IdP

image

Enter the Name of SAML IdP --> Next

image

Here we have to import the metadata XML file which we downloaded from Azure --> Next

image

In the next step we have to select the default values --> Next

image

Now click on Review and Create.

After Creating we have to Test the Connection , Click on Test Login

image

We got the error as connection failed

image

To View this assertion details more clearly , we can copy it and paste it in notepad ++ and change the language to XML, then we can read it more easily.

We are getting this error because we have not created the same user in OCI also to authenticate when we login.

image

After user is created, we have to do the test login again,

image

Now connection is working fine,

image

After testing is done , we have to activate the identity provider

image

Once it is activated , we have to add this IdP into IdP policies

Go to IdP Policies  Default IdP Policy  Click on three dots  Edit IdP rule

image

Here we have to add ‘AzureAD’ in the Assign Identity Provider section, also make sure that AzureAD comes first in sequence(Because the authentication will happen in the same sequence), so to get a failed attempt every time we follow this sequence  Save changes.

image

Now we will try to login into this account,

Here we can see an AzureAD option to login from Azure --> Click on it --> Select the account

image

Here we have to enter password of our account or select email code to this account  Enter the mail id  Send Code.

image

Here we will receive a mail from microsoft with the code to login

image

Also we have to enable secure verification --> Mobile App --> Done.

Now we will be logged into the account in OCI.