Authenticating with Microsoft services using an Azure AD tenant
Setting up authentication to Microsoft services
An Azure Active Directory (Azure AD) tenant is required when setting up publishing to Microsoft Store. The tenant is used to access Azure AD to set up the necessary credentials to allow Codemagic to generate temporary access tokens for managing application submissions.
Setting up the tenant
To get started, go to the Microsoft Partner Center, open Account settings from the settings menu, and then select Tenants under the Organization profile.
If you already have an existing tenant, you can choose to associate it with your Partner Center account, but we recommend creating a new tenant for use with Codemagic. Click Create and fill in all the required information to create a new tenant.
The newly created tenant can now be used to access Azure AD by logging in with the email and password that you created for your tenant.
When logged in, navigate to App registrations and select + New registration. Give the registration a name, and limit the access to a single tenant under Supported account types. For our usecase, the Redirect URI can be left blank. Proceed by clicking Register.
Under Essentials you can copy and store the values of the Directory (tenant) ID and Application (client) ID for later use. Proceed to Certificates & secrets on the left-side menu to create your client secret by clicking + New client secret. Give the secret a name, and if you do not wish to recreate the secret after a certain time period, set the expiry to custom with a long expiry date. Copy and store the Value of the newly created secret.
As the last step, navigate back to the Microsoft Partner Center while logged in as the tenant. Navigate to Account settings > User management > Azure Ad applications and click Create Azure Ad application. In the window that opens, select the application you created in the Azure AD portal, click Next, and give the application the developer role.
You have now successfully linked your Azure AD and Microsoft Partner Center accounts and gotten the values for the Tenant ID, Client ID and client secret parameters that have to be used when connecting the Partner Center integration or setting up publishing in codemagic.yaml
.