Napomena
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da se prijavite ili da promenite direktorijume.
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da promenite direktorijume.
Belešku
Novi i poboljšani Power Platform admin centar je sada u javnom pregledu! Dizajnirali smo novi admin centar da bude lakši za korišćenje, sa navigacijom orijentisanom na zadatke koja vam pomaže da brže postignete određene rezultate. Objavljivaćemo novu i ažuriranu dokumentaciju kako se novi Power Platform administrativni centar pomera na opštu dostupnost.
Korišćenje tabele SharePoint Dokumenti u okruženju Dinamics KSNUMKS izvan mreže dokumenata u aplikaciji zasnovanoj na modelu zahteva Azure aplikaciju za odobravanje pristupa. Primeri ovog pristupa uključuju upotrebu unutar Power Automate ili sa Dataverse API pozivima. Podešavanje koristi Power Platform Managed Identities sa Azure da odobri pristup.
Počevši od marta 2025. godine, trenutni pristup je uklonjen kako bi se poboljšala zaštita sistema. Da biste osigurali kontinuirani pristup, sledite ove korake da biste kreirali Azure aplikaciju sa potrebnim SharePoint dozvolama, postavili upravljane identitete i Dataverse konfigurisali federalne akreditive.
Kreirajte Azure aplikaciju sa dozvolama SharePoint
Kreirajte registraciju aplikacije sa dozvolom API-ja SharePoint. Saznajte više o registraciji aplikacije i SharePoint pristupu u Azure Kuickstart Registrujte aplikaciju i pristupite SharePoint preko Azure AD App-Onli.
Otvorite Azure portal.
U odjeljku Azure usluge izaberite Registracije aplikacija.
Izaberite Nova registracija.
Unesite ime aplikacije.
Pod Podržani tipovi naloga izaberite Računi samo u ovom organizacionom direktorijumu.
Belešku
Ostali tipovi nisu podržani u ovom trenutku.
Izaberite Registruj se da biste kreirali registraciju aplikacije.
Obratite pažnju na ID aplikacije (klijenta) i ID direktorijuma(stanara):
Na listi za navigaciju izaberite Pregled .
Pod Essentials , kopirajteID aplikacije (klijenta) i ID direktorijuma (stanara) vrednosti za upotrebu u sledećem odeljku.
Na listi za navigaciju izaberite Upravljanje>API dozvolama.
U odjeljku Konfigurisane dozvole izaberite Dodaj dozvolu da biste otvorili panel Zahtev za dozvole API-ja.
Izaberi SharePoint.
Pod Koju vrstu dozvola zahteva vaša aplikacija?, izaberite Dozvole aplikacije.
U odjeljku Izaberi dozvole izaberite Sites.FullControl.All.
Izaberite Dodaj dozvole da biste kreirali dozvolu SharePoint .
Izaberite Odobri saglasnost administratora za
<tenant name>
.
Kreirajte upravljane identitete u Dataverse
Kreirajte upravljane evidencije identiteta u Dataverse. Saznajte više o upravljanim identitetima u Podešavanje Dataverse upravljanih identiteta.
Dodajte zapis u tabeli upravljanih identiteta
Ubacite red u tabelu managedidentities
koristeći vrednosti iz sledeće tabele.
Polje tabele | Vrednost |
---|---|
applicationid |
Koristite ID vrednost aplikacije (klijenta) iz prvog odeljka |
tenantid |
Koristite ID vrednost direktorijuma (stanara) iz prvog odeljka |
managedidentityid |
Kreirajte novi GUID |
credentialsource |
2 |
subjectscope |
1 |
Primer korišćenja POST-a:
Zahtev:
https://contoso.crm.dynamics.com/api/data/v9.0/managedidentities
Telo:
{ "applicationid": "<appId>", "managedidentityid": "<newGuid>", "credentialsource": 2, "subjectscope": 1, "tenantid": "<tenantId>" }
Dodajte zapis u tabeli SharePoint upravljanih identiteta
Ubacite red u tabelu sharepointmanagedidentity
koristeći vrednosti iz sledeće tabele.
Polje tabele | Vrednost |
---|---|
sharepointmanagedidentityid |
Kreirajte novi GUID |
uniquename |
"msft_ppmiforsharepointauth" |
name |
"Upravljani identitet za SharePoint Auth" |
ManagedIdentity@odata.bind |
/managedidentities(<managedidentityid>) Zamena <managedidentityid> sa vrednošću iz prethodnog odeljka |
Primer korišćenja POST-a:
Zahtev:
https://contoso.crm.dynamics.com/api/data/v9.0/sharepointmanagedidentities
Telo:
{ "sharepointmanagedidentityid": "<newGuid>", "uniquename": "msft_ppmiforsharepointauth", "name": "Managed Identity For SharePoint Auth", "ManagedIdentityId@odata.bind": "/managedidentities(<managedIdentityId>)" }
Kreirajte federalne akreditive
Kreirajte federalnu akreditivu za registraciju aplikacije. Saznajte više o akreditivima federalnog identiteta u Konfigurišite aplikaciju za akreditive federativnog identiteta.
Belešku
Federalni akreditivi identiteta putem Power Platform upravljanog identiteta su generalno dostupni i u potpunosti podržani za integraciju SharePoint dokumenata. Upravljani Power Platform identitet se koristi za mnoge scenarije, ali nisu svi generalno dostupni. Međutim, ovaj slučaj je u potpunosti podržan.
Otvorite Azure portal.
Izaberite Microsoft Entra ID.
Na listi za navigaciju izaberite Upravljanje>registracijama aplikacija.
Na listi aplikacija izaberite ime za registraciju aplikacije kreirano u prethodnom odeljku.
Na listi za navigaciju izaberite Upravljanje>sertifikatima i tajnama.
Izaberite karticu Federated akreditivi .
Izaberite Dodaj akreditiv.
U polju Federated akreditivni scenario izaberite Drugi izdavač.
U polje Izdavač unesite URL izdavača:
- Format vrednosti:
https://login.microsoftonline.com/<tenantId>/v2.0
- Zamenite
<tenantId>
sa Direktorijum (tenant) ID GUID vrednost iz prethodnog odeljka.
- Format vrednosti:
U polje Vrednost unesite identifikator predmeta:
- Format vrednosti:
/eid1/c/pub/t/<base64-encoded-tenantId>/a/<base64-encoded-appid>/Env/<orgid>/sharepointmanagedidentity/<sharepointmanagedidentityid>
- Zamenite
<base64-encoded-tenantId>
sa based64 kodiranim ID-om stanara. - Zamenite
<base64-encoded-appid>
sa base64 kodiranim ID klijenta aplikacije. - Zamenite
<orgid>
sa ID organizacije. - Zamenite
<sharepointmanagedidentityid>
sa GUID-om koji je ranije kreiran sa sharepointmanagedidentities zapisom.
[NAPOMENA!] Koristite skriptu u Generišite identitet subjekta da biste generisali vrednost identifikatora predmeta sa baseKSNUMKS kodiranim vrednostima.
- Format vrednosti:
Izaberite Dodaj da kreirate akreditiv.
Prateći ove korake, konfigurišete Azure aplikaciju sa potrebnim SharePoint dozvolama, podesite upravljane identitete i Dataverse konfigurišete federalne akreditive.
Generišite identitet subjekta
Ova skripta generiše vrednost identifikatora subjekta na osnovu vrednosti datih u JavaScript-u.
Otvorite aplikaciju Dinamics KSNUMKS u pretraživaču.
Otvorite alate pretraživača na konzoli.
Kopirajte sledeći JavaScript i podesite vrednost za promenljivu sharePointManagedIdentityId.
// Replace with the id for SharePoint Managed Identity that was created attribute name: sharepointmanagedidentityid. // Refer to the following documentation for configuring an aad app for SharePoint access: // https://learn.microsoft.com/en-us/power-platform/admin/configure-azure-app-with-sharepoint-access // For the SharePoint Managed Identity creation, refer to the following documentation: // https://learn.microsoft.com/en-us/power-platform/admin/configure-azure-app-with-sharepoint-access#add-record-in-sharepoint-managed-identities-table const sharePointManagedIdentityId = ""; const prefixForFICIssuer = "https://login.microsoftonline.com/"; const suffixForFICIssuer = "/v2.0"; const prefixForFICSubject = "/eid1/c/pub"; const tenantIdentifierForFICSubject = "/t/"; const appIdentifierForFICSubject = "/a/"; const environmentIdentifierForFICSubject = "/Env/"; const sharePointManagedIdentityIdentifierForFICSubject = "/sharepointmanagedidentity/"; // This is the AAD App Id to be used for Power Platform Managed Identity: 58e835ab-2e39-46a9-b797-accce6633447 const powerPlatformManagedIdentityAppId = "58e835ab-2e39-46a9-b797-accce6633447"; /** * Represents a request for retrieving the current organization. * @param {number} accessType - The access type (0 for Default, 1 for Internet, 2 for Intranet). */ var RetrieveCurrentOrganizationRequest = function (accessType) { this.AccessType = accessType; }; /** * Gets metadata for the request. * @returns {Object} The metadata for the request. */ RetrieveCurrentOrganizationRequest.prototype.getMetadata = function() { return { boundParameter: null, parameterTypes: { "AccessType": { "typeName": "Microsoft.Dynamics.CRM.EndpointAccessType", "structuralProperty": 3, // Enum Type "enumProperties": [ { "name": "Default", "value": 0 }, { "name": "Internet", "value": 1 }, { "name": "Intranet", "value": 2 } ] } }, operationType: 1, // This is a function operationName: "RetrieveCurrentOrganization" }; }; /** * Encodes a GUID to a Base64 URL-safe string. * * @param {string} guid - The GUID to encode. * @returns {string} The Base64 URL-safe encoded string. * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/btoa} */ function encodeToBase64Url(guid) { const buffer = []; const regex = /.{1,2}/g; guid.split('-').forEach((number, index) => { const bytesInChar = number.match(regex); if (index < 3) bytesInChar.reverse(); bytesInChar.forEach(byte => buffer.push(parseInt(byte, 16))); }); const base64String = btoa(String.fromCharCode.apply(null, new Uint8Array(buffer))); // Make the Base64 string URL-safe by replacing '+' with '-' and '/' with '_' // Remove any trailing '=' characters return base64String.slice(0, 22).replace(/=+$/, '').replace(/\+/g, '-').replace(/\//g, '_'); } /** * Construct the issuer URL using the tenant ID. * This is needed for the issuer url in FIC configuration. * @param {string} tenantId - The tenant ID. * @returns {string} The constructed issuer URL. * @example * // Example for output * // https://login.microsoftonline.com/your-tenant-id/v2.0 */ function constructIssuerUrlForFIC(tenantId) { return `${prefixForFICIssuer}${tenantId}${suffixForFICIssuer}`; } /** * Constructs the subject url using the encoded tenant ID, encoded app ID, environment ID, and SharePoint managed identity ID. * This is needed for the subject url in FIC configuration. * @param {string} encodedTenantId - The encoded tenant ID. * @param {string} encodedAppId - The encoded app ID. * @param {string} environmentId - The environment ID. * @param {string} sharePointManagedIdentityId - The SharePoint managed identity ID. * @returns {string} The constructed subject string. * @example * // Example output: /eid1/c/pub/t/<EncodedTenantId>/a/<EncodedDV1PAppId>/Env/<EnvironmentId>/sharepointmanagedidentity/<sharePointManagedIdentityId> */ function constructSubjectUrlForFIC(encodedTenantId, encodedAppId, environmentId, sharePointManagedIdentityId) { return `${prefixForFICSubject}${tenantIdentifierForFICSubject}${encodedTenantId}${appIdentifierForFICSubject}${encodedAppId}${environmentIdentifierForFICSubject}${environmentId}${sharePointManagedIdentityIdentifierForFICSubject}${sharePointManagedIdentityId}`; } (async () => { try { // Check if sharePointManagedIdentityId is null or undefined if (!sharePointManagedIdentityId) { console.error("SharePoint Managed Identity ID is null or undefined. Please ensure that the SharePoint Managed Identity ID is set."); return; } const accessType = 0; const retrieveCurrentOrganizationRequest = new RetrieveCurrentOrganizationRequest(accessType); // Execute the request to retrieve the current organization details // https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-webapi/online/execute // https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/web-api-functions-actions-sample#section-4-unbound-function-retrievecurrentorganization const response = await Xrm.WebApi.online.execute(retrieveCurrentOrganizationRequest); const result = await response.json(); if (result.Detail) { const { EnvironmentId: environmentId, TenantId: tenantId } = result.Detail; const encodedTenantId = encodeToBase64Url(tenantId); const encodedPowerPlatformManagedIdentityAppId = encodeToBase64Url(powerPlatformManagedIdentityAppId); const issuerUrlForFederatedCredentialConfig = constructIssuerUrlForFIC(tenantId); const subjectUrlForFederatedCredentialConfig = constructSubjectUrlForFIC(encodedTenantId, encodedPowerPlatformManagedIdentityAppId, environmentId, sharePointManagedIdentityId); console.log(`SharePoint Managed Identity ID: ${sharePointManagedIdentityId}, Tenant ID: ${tenantId}, Encoded Tenant ID: ${encodedTenantId}, Power Platform Managed Identity App ID: ${powerPlatformManagedIdentityAppId}, Encoded App ID: ${encodedPowerPlatformManagedIdentityAppId}, Issuer URL for Federated Credential Configuration: ${issuerUrlForFederatedCredentialConfig}, Subject URL for Federated Credential Configuration: ${subjectUrlForFederatedCredentialConfig}`); } else { console.error("RetrieveCurrentOrganization response is missing detail."); } } catch (error) { console.error(`Error executing request: ${error.message}`); } })();
Nalepite u konzolu da izvrši.
Kopirajte identifikator predmeta i nalepite ga u polje Vrednost u Dodaj akreditiv.