Microsoft Entra ID (UNI-ID) autentimise ja ligipääsude juhend arendajatele / Microsoft Entra ID (UNI-ID) Authentication and Access Guide for Developers

Microsoft Entra ID (UNI-ID) autentimise ja ligipääsude juhend arendajatele / Microsoft Entra ID (UNI-ID) Authentication and Access Guide for Developers

1. Taotluse esitamine IT-osakonnale

Enne kui tudengid või õppejõud saavad oma rakenduses kasutada ülikooli UNI-ID autentimist, tuleb IT-osakonnale esitada taotlus (https://taltech.atlassian.net/servicedesk/customer/portal/14/group/33/create/473 ) Taotlus peab sisaldama järgmist infot, et tagada rakenduse korrektne toimimine ja turvalisus.

1.1 Rakenduse ülevaade

  • Rakenduse nimi: Määra rakenduse ametlik nimi.

  • Eesmärk ja funktsionaalsus:

    • Millist probleemi rakendus lahendab?

    • Mis on rakenduse peamised funktsioonid?

1.2 Rakenduse elutsükkel

  • Kui kaua plaanitakse rakendust kasutada? (nt 3 kuud, 6 kuud, 1 aasta või pikem periood)

1.3 Vastutavad isikud

  • Vastutav isik: Kes vastutab rakenduse toimimise ja küsimustele vastamise eest? (Tavaliselt õppejõud või töötaja)

  • Rakenduse arendajad: Peamised loojad koos nimede ja e-posti aadressidega.

1.4 Kasutajad

  • Kes peavad saama rakendusele ligi?

    • Ainult tudengid

    • Ainult töötajad

    • Tudengid ja töötajad

    • Konkreetne osakond või grupp

1.5 Autentimine ja ligipääsuõigused

Millist autentimisviisi rakendus kasutab Entra ID suunal API-päringute tegemiseks?

  • Client Secret (salajane võti) – Kui rakendus on mõeldud ainult kasutajate sisselogimiseks ega tee automaatseid API-päringuid.

  • Client Certificate (sertifikaadipõhine autentimine) – Kui rakendus vajab sertifikaadipõhist autentimist.

Milliseid Microsoft Graph API õigusi rakendus vajab?

  • User.Read – Kasutaja saab lugeda enda profiili.

  • User.ReadBasic.All – Saab lugeda kõigi kasutajate põhiteavet.

  • GroupMember.Read.All – Saab lugeda kasutajate gruppe.

  • Directory.Read.All – Saab lugeda kogu kataloogi (ainult kõrgendatud õigustega rakendustele).

  • Application.Read.All, RoleManagement.Read.Directory – Rakenduse konfiguratsiooni ja rollide lugemine.

  • Device.Read.All – Seadmete päringud, kui rakendus vajab teavet organisatsiooni seadmete kohta.

  • Muu API-päring – Kui rakendus vajab ligipääsu spetsiifilistele Entra ID ressurssidele, tuleks see eraldi täpsustada.

📌 Märkus: Kui pole kindel, milliseid päringuid rakendus vajab, soovitame enne taotluse esitamist konsulteerida IT-osakonnaga.

1.6 Rakenduse tüüp ja kasutatavad tehnoloogiad

  • Rakenduse tüüp:

    • Veebirakendus (React, Angular, Vue, PHP, Java vms)

    • Mobiilirakendus (Android, iOS)

    • Serveripoolne teenus (Node.js, .NET, Python vms)

    • Muu (täpsusta)

  • Rakenduse Redirect URL

    • Veebiaadress, kuhu kasutaja suunatakse pärast edukat autentimist Entra ID kaudu. See on oluline osa autentimisprotsessist, kuna see määrab, kuhu suunatakse kasutaja pärast sisselogimist ja kust rakendus saab kinnituse, et autentimine õnnestus) NB! Redirect URI peab olema registreeritud IT-osakonna poolt Entra ID keskkonnas, vastasel juhul autentimine ebaõnnestub.

      • Veebirakendused: https://minurakendus.ee/auth/callback

      • Kohalik arendus: http://localhost:3000/auth/callback

      • Mobiilirakendused: com.minurakendus://auth


2. Näited Azure Entra ID integreerimisest erinevates tehnoloogiates

Näited Entra ID integreerimiseks erinevates tehnoloogiates:

Üldine info: Microsoft identity platform documentation - Microsoft identity platform

📌 NB! Arendajad peavad kasutama OAuth 2.0 ja OpenID Connect standardeid Entra ID-ga autentimiseks.


3. Rakenduse turvalisuse tagamine

  • Ära hoia client secret'i koodis – kasuta turvalisi keskkonnamuutujaid.

  • Kasuta HTTPS-ühendust – vältimaks man-in-the-middle ründeid.

  • Määra õiged API-load – ära küsi rohkem õigusi kui vaja.

  • Loo testkeskkond – et enne rakenduse avaldamist turvalisus üle kontrollida.


4. Protsessi kirjeldus

  1. Tudeng või õppejõud täidab taotluse IT-osakonnale (sisaldades rakenduse nime, kestust, vastutavat isikut, õigusi ja tehnoloogiaid).

  2. IT-admin loob Azure Entra ID-s rakenduse (sisemine juhis adminile: https://taltech.atlassian.net/wiki/spaces/ITO/pages/963772418), määrab õigused ja genereerib vajalikud võtmed.

  3. Arendajad integreerivad Entra ID oma rakendusse Microsofti dokumentatsiooni alusel.

  4. Jälgitakse turvanõudeid ja rakendust haldatakse vastavalt elutsüklile.

Kui kõik on korrektselt seadistatud, saavad tudengid ja töötajad siseneda rakendusse oma ülikooli UNI-ID kontoga ilma vajaduseta luua eraldi kasutajakontosid.

1. Submitting a Request to the IT Department

Before students or faculty members can use the university's UNI-ID authentication in their application (https://taltech.atlassian.net/servicedesk/customer/portal/14/group/33/create/473 ), they must submit a request to the IT department. The request must include the following information to ensure the correct functioning and security of the application.

1.1 Application Overview

  • Application Name: Define the official name of the application.

  • Purpose and Functionality:

    • What problem does the application solve?

    • What are the main functions of the application?

1.2 Application Lifecycle

  • How long is the application planned to be used? (e.g., 3 months, 6 months, 1 year, or longer)

1.3 Responsible Persons

  • Responsible Person: Who is responsible for the application's operation and responding to inquiries? (Usually a faculty member or staff)

  • Application Developers: Main creators with names and email addresses.

1.4 Users

Who should have access to the application?

  • Only students

  • Only staff

  • Both students and staff

  • A specific department or group

1.5 Authentication and Access Rights

Which authentication method does the application use for API requests to Entra ID?

  • Client Secret – If the application is only for user login and does not make automated API requests.

  • Client Certificate – If the application requires certificate-based authentication.

Which Microsoft Graph API permissions does the application require?

  • User.Read – Allows a user to read their own profile.

  • User.ReadBasic.All – Allows reading basic information of all users.

  • GroupMember.Read.All – Allows reading users’ groups.

  • Directory.Read.All – Allows reading the entire directory (only for privileged applications).

  • Application.Read.All, RoleManagement.Read.Directory – Allows reading application configurations and roles.

  • Device.Read.All – Allows querying devices if the application requires information about the organization's devices.

  • Other API Requests – If the application needs access to specific Entra ID resources, specify them separately.

📌 Note: If unsure about which permissions the application requires, it is recommended to consult the IT department before submitting the request.

1.6 Application Type and Technologies Used

  • Application Type:

    • Web application (React, Angular, Vue, PHP, Java, etc.)

    • Mobile application (Android, iOS)

    • Server-side service (Node.js, .NET, Python, etc.)

    • Other (specify)

  • Application Redirect URL:
    The web address where the user is redirected after successful authentication through Entra ID. This is a crucial part of the authentication process, as it determines where the user is directed after logging in and where the application receives confirmation that authentication was successful.

    📌 NB! The Redirect URI must be registered by the IT department in the Entra ID environment; otherwise, authentication will fail.

    • Web applications: https://myapplication.com/auth/callback

    • Local development: http://localhost:3000/auth/callback

    • Mobile applications: com.myapplication://auth


2. Examples of Azure Entra ID Integration in Different Technologies

Examples of integrating Entra ID in various technologies:

📌 NB! Developers must use OAuth 2.0 and OpenID Connect standards for authentication with Entra ID.


3. Ensuring Application Security

  • Do not store the client secret in code – use secure environment variables.

  • Use HTTPS connections – to prevent man-in-the-middle attacks.

  • Set correct API permissions – do not request more permissions than necessary.

  • Create a test environment – to verify security before deploying the application.


4. Process Description

  1. The student or faculty member submits a request to the IT department, including the application's name, duration, responsible person, required permissions, and technologies used.

  2. The IT administrator creates the application in Azure Entra ID (https://taltech.atlassian.net/wiki/spaces/ITO/pages/963772418 ), assigns permissions, and generates the necessary keys.

  3. Developers integrate Entra ID into their application based on Microsoft documentation.

  4. Security requirements are followed, and the application is managed according to its lifecycle.

  5. Once everything is correctly configured, students and staff can log in to the application using their university UNI-ID without needing to create separate user accounts.

Related content