How can we give other "organizations" in Azure DevOps access to the package?
You can use service connections to do that. The service connection type you need to choose depends on the type of your package.
Here is an example of getting access to a universal package from another organization.
Step1:
Go to Project Settings -> Pipelines/Service connections -> New service connection -> Azure Repos/Team Foundation Server -> Next.
Connect this project to the organization of the package.
Step2:
If you are using Classic UI pipeline, add a built-in task 'Universal packages'. Choose 'Another organization/collection' in 'Feed location'. Choose the connection you created in step1 and fill in information of the feed.
If you are using YAML, add the following task:
- task: UniversalPackages@0
displayName: 'Universal download'
inputs:
feedsToUse: external
externalFeedCredentials: {service connection}
# if you are using project-scoped feed, replace {feed} with {project/feed}
feedDownloadExternal: {feed}
packageDownloadExternal: {package}
versionDownloadExternal: {version number}
If you want to connect to a Npm/Nuget/Maven/... package, you need to create a correspondant service connection and use Feed URL instead of organization URL. Then in pipeline, you need to run an authenticate task (you can find it in built-in task list) before using the package. Click this document for detailed information.